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:
2026-04-28 19:24:39 -04:00
parent 957e0f137b
commit 79bb249603

View File

@@ -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%");