Skip to content

Commit c786c6b

Browse files
chore: add test for export reliance
1 parent 18f8da3 commit c786c6b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { describe, expect, it } from "vitest";
2+
import { AllTools, ToolBase } from "../../../src/tools/index.js";
3+
4+
describe("all exported tools", () => {
5+
it("'AllTools' should be a list of ToolBase implementations", () => {
6+
expect(AllTools).toBeInstanceOf(Array);
7+
AllTools.forEach((toolCtor) => {
8+
expect(Object.prototype.isPrototypeOf.call(ToolBase, toolCtor)).toBe(true);
9+
});
10+
});
11+
12+
it("each tool in 'AllTools' list should have required static properties for ToolClass conformance", () => {
13+
AllTools.forEach((toolCtor) => {
14+
expect(toolCtor).toHaveProperty("category");
15+
expect(toolCtor).toHaveProperty("operationType");
16+
});
17+
});
18+
});

0 commit comments

Comments
 (0)