Skip to content

Commit 5541343

Browse files
starfish719claude
andcommitted
test: additional toEqual to toStrictEqual replacements
Apply toStrictEqual changes to additional test files that were modified. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent d477fe5 commit 5541343

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

packages/client/test/client/auth.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('OAuth Authorization', () => {
4545
}
4646
} as unknown as Response;
4747

48-
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ resourceMetadataUrl: new URL(resourceUrl) });
48+
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ error: undefined, resourceMetadataUrl: new URL(resourceUrl), scope: undefined });
4949
});
5050

5151
it('returns scope when present', async () => {
@@ -56,7 +56,7 @@ describe('OAuth Authorization', () => {
5656
}
5757
} as unknown as Response;
5858

59-
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ scope: scope });
59+
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ error: undefined, resourceMetadataUrl: undefined, scope: scope });
6060
});
6161

6262
it('returns empty object if not bearer', async () => {
@@ -80,7 +80,7 @@ describe('OAuth Authorization', () => {
8080
}
8181
} as unknown as Response;
8282

83-
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({});
83+
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ error: undefined, resourceMetadataUrl: undefined, scope: undefined });
8484
});
8585

8686
it('returns undefined resourceMetadataUrl on invalid url', async () => {
@@ -94,7 +94,7 @@ describe('OAuth Authorization', () => {
9494
}
9595
} as unknown as Response;
9696

97-
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ scope: scope });
97+
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ error: undefined, resourceMetadataUrl: undefined, scope: scope });
9898
});
9999

100100
it('returns error when present', async () => {
@@ -104,7 +104,7 @@ describe('OAuth Authorization', () => {
104104
}
105105
} as unknown as Response;
106106

107-
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ error: 'insufficient_scope', scope: 'admin' });
107+
expect(extractWWWAuthenticateParams(mockResponse)).toStrictEqual({ error: 'insufficient_scope', resourceMetadataUrl: undefined, scope: 'admin' });
108108
});
109109
});
110110

packages/core/test/shared/protocol.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ describe('Task-based execution', () => {
13531353
{
13541354
taskId: task1.taskId,
13551355
status: 'completed',
1356+
statusMessage: undefined,
13561357
ttl: null,
13571358
createdAt: expect.any(String),
13581359
lastUpdatedAt: expect.any(String),

test/integration/test/server.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ test('should include url mode when sending elicitation URL requests', async () =
796796
url: 'https://example.com/verify'
797797
})
798798
).resolves.toStrictEqual({
799-
action: 'decline'
799+
action: 'decline',
800+
content: undefined
800801
});
801802

802803
expect(receivedModes).toStrictEqual(['url']);
@@ -1327,7 +1328,8 @@ test('should allow elicitation reject and cancel without validation', async () =
13271328
requestedSchema: schema
13281329
})
13291330
).resolves.toStrictEqual({
1330-
action: 'decline'
1331+
action: 'decline',
1332+
content: undefined
13311333
});
13321334

13331335
// Test cancel - should not validate
@@ -1338,7 +1340,8 @@ test('should allow elicitation reject and cancel without validation', async () =
13381340
requestedSchema: schema
13391341
})
13401342
).resolves.toStrictEqual({
1341-
action: 'cancel'
1343+
action: 'cancel',
1344+
content: undefined
13421345
});
13431346
});
13441347

test/integration/test/server/elicitation.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ function testElicitationFlow(validatorProvider: typeof ajvProvider | typeof cfWo
308308
});
309309

310310
expect(result).toStrictEqual({
311-
action: 'decline'
311+
action: 'decline',
312+
content: undefined
312313
});
313314
});
314315

@@ -330,7 +331,8 @@ function testElicitationFlow(validatorProvider: typeof ajvProvider | typeof cfWo
330331
});
331332

332333
expect(result).toStrictEqual({
333-
action: 'cancel'
334+
action: 'cancel',
335+
content: undefined
334336
});
335337
});
336338

test/integration/test/server/mcp.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3390,8 +3390,8 @@ describe.each(zodTestMatrix)('$zodVersionLabel', (entry: ZodMatrixEntry) => {
33903390
expect(result.prompts).toHaveLength(1);
33913391
expect(result.prompts[0]!.name).toBe('test');
33923392
expect(result.prompts[0]!.arguments).toStrictEqual([
3393-
{ name: 'name', required: true },
3394-
{ name: 'value', required: true }
3393+
{ description: undefined, name: 'name', required: true },
3394+
{ description: undefined, name: 'value', required: true }
33953395
]);
33963396
});
33973397

0 commit comments

Comments
 (0)