test: update plugin tests for MCP-backed LSP

This commit is contained in:
YeonGyu-Kim
2026-05-18 12:12:48 +09:00
parent 8716ef458c
commit 48c827ffc0
4 changed files with 5 additions and 55 deletions
+5 -3
View File
@@ -1,7 +1,6 @@
const { afterEach, describe, expect, test } = require("bun:test")
const { createToolExecuteBeforeHandler } = require("./tool-execute-before")
const { createToolRegistry } = require("./tool-registry")
const { builtinTools } = require("../tools")
const { resetStorageClient } = require("../tools/session-manager/storage")
describe("createToolExecuteBeforeHandler", () => {
@@ -335,13 +334,16 @@ describe("createToolRegistry", () => {
describe("#given max_tools is lower than or equal to builtin tool count", () => {
describe("#when creating the tool registry", () => {
test("#then it trims to the exact configured cap", () => {
const baseline = createToolRegistry(createRegistryInput())
const baselineToolCount = Object.keys(baseline.filteredTools).length
const result = createToolRegistry(
createRegistryInput({
experimental: { max_tools: Object.keys(builtinTools).length },
experimental: { max_tools: baselineToolCount },
}),
)
expect(Object.keys(result.filteredTools)).toHaveLength(Object.keys(builtinTools).length)
expect(Object.keys(result.filteredTools)).toHaveLength(baselineToolCount)
})
})
})
@@ -63,7 +63,6 @@ describe("team-mode tool registry wiring", () => {
},
availableCategories: [],
toolFactories: {
builtinTools: { bash: fakeTool, read: fakeTool },
createBackgroundTools: mock(() => ({})),
createCallOmoAgent: mock(() => fakeTool),
createLookAt: mock(() => fakeTool),
-1
View File
@@ -46,7 +46,6 @@ const TEAM_TOOL_NAMES = [
const { createToolRegistry, trimToolsToCap } = await import("./tool-registry")
const toolFactories: NonNullable<Parameters<typeof createToolRegistry>[0]["toolFactories"]> = {
builtinTools: { bash: fakeTool, read: fakeTool },
createBackgroundTools: mock(() => ({})),
createCallOmoAgent: mock(() => fakeTool),
createLookAt: mock(() => fakeTool),