Ensure tests will always use the current client name and version

This commit is contained in:
Richard Michael 2025-08-22 10:47:36 -07:00
commit ae7d745d5e

View file

@ -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({