Skip to content

Commit b73a090

Browse files
committed
test(agents-core): fix mcpCache tests by passing RunContext and Agent to getAllMcpTools
1 parent 32156db commit b73a090

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/agents-core/test/mcpCache.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ describe('MCP tools cache invalidation', () => {
8787
];
8888

8989
const serverA = new StubServer('server', tools);
90-
await getAllMcpTools([serverA]);
90+
await getAllMcpTools(
91+
[serverA],
92+
new RunContext({}),
93+
new Agent({ name: 'test' }),
94+
);
9195

9296
const serverB = new StubServer('server', tools);
9397
let called = false;
@@ -96,7 +100,11 @@ describe('MCP tools cache invalidation', () => {
96100
return [];
97101
};
98102

99-
const cachedTools = (await getAllMcpTools([serverB])) as FunctionTool[];
103+
const cachedTools = (await getAllMcpTools(
104+
[serverB],
105+
new RunContext({}),
106+
new Agent({ name: 'test' }),
107+
)) as FunctionTool[];
100108
await cachedTools[0].invoke({} as any, '{}');
101109

102110
expect(called).toBe(true);

0 commit comments

Comments
 (0)