Ensure tests will always use the current client name and version
This commit is contained in:
parent
0d202ee47b
commit
ae7d745d5e
1 changed files with 13 additions and 10 deletions
|
|
@ -2,7 +2,7 @@ import { renderHook, act } from "@testing-library/react";
|
|||
import { useConnection } from "../useConnection";
|
||||
import { z } from "zod";
|
||||
import { ClientRequest } from "@modelcontextprotocol/sdk/types.js";
|
||||
import { DEFAULT_INSPECTOR_CONFIG } from "../../constants";
|
||||
import { DEFAULT_INSPECTOR_CONFIG, CLIENT_IDENTITY } from "../../constants";
|
||||
import {
|
||||
SSEClientTransportOptions,
|
||||
SseError,
|
||||
|
|
@ -247,8 +247,8 @@ describe("useConnection", () => {
|
|||
|
||||
expect(Client).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
name: "inspector-client",
|
||||
version: expect.any(String),
|
||||
name: CLIENT_IDENTITY.name,
|
||||
version: CLIENT_IDENTITY.version,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
capabilities: expect.objectContaining({
|
||||
|
|
|
|||
Loading…
Reference in a new issue