test: add tests for model-dependent tool definitions

This commit is contained in:
Aishanee Shah
2026-02-06 19:05:30 +00:00
parent e1c0e6d714
commit a4f780feb9
10 changed files with 141 additions and 30 deletions
+15
View File
@@ -815,4 +815,19 @@ describe('ShellTool', () => {
}
});
});
describe('getSchema', () => {
it('should return the base schema when no modelId is provided', () => {
const schema = shellTool.getSchema();
expect(schema.name).toBe(SHELL_TOOL_NAME);
expect(schema.description).toMatchSnapshot();
});
it('should return the schema from the resolver when modelId is provided', () => {
const modelId = 'gemini-2.0-flash';
const schema = shellTool.getSchema(modelId);
expect(schema.name).toBe(SHELL_TOOL_NAME);
expect(schema.description).toMatchSnapshot();
});
});
});