From 1eaebdaf63922610fb76cfabece664e26689b6d9 Mon Sep 17 00:00:00 2001 From: cliffhall Date: Sun, 23 Aug 2026 18:06:37 -0400 Subject: [PATCH] test: assert the dropped-member warning by its binding, not its message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generalizing the sanitizer changed the warning to one message shared by every reserved member, moving the offending key into the log's bindings — but this test still matched on the old message text, so it stopped finding the call at all. Caught by `npm run ci`. Asserting `{ key, received }` is the more durable check anyway: the message is now common to all reserved members, while the binding is what identifies which one was dropped. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_0177mPHAdECD18nLLCTwR5rh Signed-off-by: cliffhall --- .../web/src/test/integration/mcp/inspectorClient.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clients/web/src/test/integration/mcp/inspectorClient.test.ts b/clients/web/src/test/integration/mcp/inspectorClient.test.ts index 8bd2a3bf..bcace955 100644 --- a/clients/web/src/test/integration/mcp/inspectorClient.test.ts +++ b/clients/web/src/test/integration/mcp/inspectorClient.test.ts @@ -1579,11 +1579,13 @@ describe("InspectorClient", () => { await client.connect(); await client.listTools(); - const call = warn.mock.calls.find((c) => - String(c[1]).includes("progressToken"), + // The offending key travels in the log's bindings, not in the message — + // the message is shared by every reserved member the sanitizer drops. + const call = warn.mock.calls.find( + (c) => (c[0] as { key?: string })?.key === "progressToken", ); expect(call).toBeDefined(); - expect(call![0]).toEqual({ received: "object" }); + expect(call![0]).toEqual({ key: "progressToken", received: "object" }); // Belt and braces: the secret must not appear anywhere in the record. expect(JSON.stringify(warn.mock.calls)).not.toContain("sk-live"); });