Skip to content

Commit 4824b79

Browse files
committed
test(mcp): drop an unused parameter from the stdio twin's masking wrapper
Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi Co-authored-by: Claude <noreply@anthropic.com>
1 parent c3c6fa1 commit 4824b79

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎packages/mcp/src/mcp-not-recorded.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ describe('[#35138] stdio door: the answer names only what the caller can see', (
346346
return { call, close: () => client.close() };
347347
}
348348

349-
async function under<T>(testCase: ObjectSchemaMaskCase, run: () => Promise<T>): Promise<T> {
349+
/** Run `run` with masking on: none of these cases switches it off. */
350+
async function underMasking<T>(run: () => Promise<T>): Promise<T> {
350351
const previous = process.env[OBJECT_SCHEMA_MASK_DISABLE_ENV];
351352
delete process.env[OBJECT_SCHEMA_MASK_DISABLE_ENV];
352353
try {
@@ -368,7 +369,7 @@ describe('[#35138] stdio door: the answer names only what the caller can see', (
368369
'%s: a field the caller cannot see gets the members a field that does not exist gets',
369370
async (_id, testCase) => {
370371
const expected = testCase.expect as { present: readonly string[]; absent: readonly string[] };
371-
await under(testCase, async () => {
372+
await underMasking(async () => {
372373
const session = await connect(testCase);
373374
try {
374375
const ask = (field: string) =>
@@ -405,7 +406,7 @@ describe('[#35138] stdio door: the answer names only what the caller can see', (
405406
it.each(objectCases.map((c) => [c.id, c] as const))(
406407
'%s: an object the caller cannot read gets the members an object that does not exist gets',
407408
async (_id, testCase) => {
408-
await under(testCase, async () => {
409+
await underMasking(async () => {
409410
const session = await connect(testCase);
410411
try {
411412
for (const [tool, extra] of [

0 commit comments

Comments
 (0)