test: drop redundant web search registration smokes

This commit is contained in:
Peter Steinberger
2026-04-01 02:57:08 +01:00
parent 49ac85b56d
commit 73ead2425b
3 changed files with 0 additions and 73 deletions

View File

@@ -64,39 +64,6 @@ describe("tavily tools", () => {
expect(applied.plugins?.entries?.tavily?.enabled).toBe(true);
});
it("registers web search provider and two tools", () => {
const registrations: {
webSearchProviders: unknown[];
tools: unknown[];
} = { webSearchProviders: [], tools: [] };
const mockApi = {
registerWebSearchProvider(provider: unknown) {
registrations.webSearchProviders.push(provider);
},
registerTool(tool: unknown) {
registrations.tools.push(tool);
},
config: {},
};
plugin.register(mockApi as never);
expect(plugin.id).toBe("tavily");
expect(plugin.name).toBe("Tavily Plugin");
expect(registrations.webSearchProviders).toHaveLength(1);
expect(registrations.tools).toHaveLength(2);
const provider = registrations.webSearchProviders[0] as Record<string, unknown>;
expect(provider.id).toBe("tavily");
expect(provider.autoDetectOrder).toBe(70);
expect(provider.envVars).toEqual(["TAVILY_API_KEY"]);
const toolNames = registrations.tools.map((t) => (t as Record<string, unknown>).name);
expect(toolNames).toContain("tavily_search");
expect(toolNames).toContain("tavily_extract");
});
it("maps generic provider args into Tavily search params", async () => {
const provider = createTavilyWebSearchProvider();
const tool = provider.createTool({