chore: replace any cast by asserting tool schema property types
Tightens the type assertion for the `unstableFilter` schema property in tests to ensure correct structural checking of its `type` and `description` fields.
This commit is contained in:
@@ -72,7 +72,10 @@ describe("MCP protocol unstableFilter", () => {
|
|||||||
const tool = tools.find((t) => t.name === toolName);
|
const tool = tools.find((t) => t.name === toolName);
|
||||||
expect(tool).toBeDefined();
|
expect(tool).toBeDefined();
|
||||||
expect(tool?.inputSchema.properties).toHaveProperty("unstableFilter");
|
expect(tool?.inputSchema.properties).toHaveProperty("unstableFilter");
|
||||||
const prop = tool?.inputSchema.properties.unstableFilter as any;
|
const prop = tool?.inputSchema.properties.unstableFilter as {
|
||||||
|
type: string;
|
||||||
|
description: string;
|
||||||
|
};
|
||||||
expect(prop.type).toBe("boolean");
|
expect(prop.type).toBe("boolean");
|
||||||
expect(prop.description).toContain("optional");
|
expect(prop.description).toContain("optional");
|
||||||
expect(prop.description).toContain("20%");
|
expect(prop.description).toContain("20%");
|
||||||
|
|||||||
Reference in New Issue
Block a user