Files
next-tjwater-agent/tests/opencode/disabledTools.test.ts
T
jiang 6336157ff4
Generic Container CI/CD / test-build-publish (push) Successful in 1m6s
Agent CI/CD / build-test-publish-and-deploy (push) Successful in 1m7s
feat: upgrade investigation and presentation runtime
2026-10-30 17:30:19 +08:00

26 lines
1.1 KiB
TypeScript

import { describe, expect, it } from "bun:test";
import { existsSync } from "node:fs";
const disabledServerTools = [
"get_project_context",
"list_scada_assets",
"query_scada_readings",
];
describe("disabled opencode tools", () => {
it("keeps removed generic server tools disabled while using one typed presentation tool", () => {
for (const toolName of disabledServerTools) {
expect(existsSync(`.opencode/tools/${toolName}.ts`)).toBeFalse();
}
expect(existsSync(".opencode/tools/server_api_shared.ts")).toBeFalse();
expect(existsSync(".opencode/tools/web_search.ts")).toBeFalse();
expect(existsSync(".opencode/tools/geocode.ts")).toBeFalse();
expect(existsSync(".opencode/tools/present_view.ts")).toBeTrue();
for (const name of ["locate_features", "zoom_to_map", "show_chart", "view_history", "render_scada_analysis", "clear_scada_analysis"]) {
expect(existsSync(`.opencode/tools/${name}.ts`)).toBeFalse();
}
expect(existsSync(".opencode/tools/frontend_action.ts")).toBeTrue();
expect(existsSync(".opencode/plugins/tjwater-tools.ts")).toBeTrue();
});
});