sync local pi changes
This commit is contained in:
@@ -2,14 +2,19 @@ import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import webSearchExtension from "../index.ts";
|
||||
|
||||
test("the extension entrypoint registers both web_search and web_fetch", () => {
|
||||
test("the extension entrypoint registers both tools and the config command", () => {
|
||||
const registeredTools: string[] = [];
|
||||
const registeredCommands: string[] = [];
|
||||
|
||||
webSearchExtension({
|
||||
registerTool(tool: { name: string }) {
|
||||
registeredTools.push(tool.name);
|
||||
},
|
||||
registerCommand(name: string) {
|
||||
registeredCommands.push(name);
|
||||
},
|
||||
} as any);
|
||||
|
||||
assert.deepEqual(registeredTools, ["web_search", "web_fetch"]);
|
||||
assert.deepEqual(registeredCommands, ["web-search-config"]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user