Skip to content

Commit 1c6fbef

Browse files
committed
Fix test error from code fix
1 parent f33d0cd commit 1c6fbef

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

mcp-test-client/tests/mcp-client.test.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,17 @@ describe('MCPClient', () => {
360360
});
361361

362362
it('should execute prompt successfully', async () => {
363-
const mockResult = 'Prompt executed successfully';
363+
const mockPromptTemplate = {
364+
messages: [
365+
{ content: { text: 'Prompt executed successfully' } }
366+
]
367+
};
364368

365369
mockFetch.mockResolvedValue({
366370
ok: true,
367371
json: () => Promise.resolve({
368372
jsonrpc: '2.0',
369-
result: {
370-
messages: [
371-
{ content: { text: mockResult } }
372-
]
373-
},
373+
result: mockPromptTemplate,
374374
id: 1
375375
})
376376
} as any);
@@ -396,7 +396,8 @@ describe('MCPClient', () => {
396396
// Verify the API was called - detailed body validation skipped due to TypeScript complexity
397397
expect(mockFetch).toHaveBeenCalledTimes(1);
398398

399-
expect(result).toBe(mockResult);
399+
// Now expects the full prompt template structure, not just the text
400+
expect(result).toEqual(mockPromptTemplate);
400401
});
401402
});
402403

0 commit comments

Comments
 (0)