diff --git a/src/agents/tool-policy.conformance.e2e.test.ts b/src/agents/tool-policy.conformance.e2e.test.ts deleted file mode 100644 index 676a0b3023a..00000000000 --- a/src/agents/tool-policy.conformance.e2e.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { describe, expect, test } from "vitest"; -import { TOOL_POLICY_CONFORMANCE } from "./tool-policy.conformance.js"; -import { TOOL_GROUPS } from "./tool-policy.js"; - -describe("TOOL_POLICY_CONFORMANCE", () => { - test("matches exported TOOL_GROUPS exactly", () => { - expect(TOOL_POLICY_CONFORMANCE.toolGroups).toEqual(TOOL_GROUPS); - }); - - test("is JSON-serializable", () => { - expect(() => JSON.stringify(TOOL_POLICY_CONFORMANCE)).not.toThrow(); - }); -}); diff --git a/src/agents/tool-policy.e2e.test.ts b/src/agents/tool-policy.e2e.test.ts index b4b9d20a086..227c7f327d8 100644 --- a/src/agents/tool-policy.e2e.test.ts +++ b/src/agents/tool-policy.e2e.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from "vitest"; +import { TOOL_POLICY_CONFORMANCE } from "./tool-policy.conformance.js"; import { expandToolGroups, resolveToolProfilePolicy, TOOL_GROUPS } from "./tool-policy.js"; describe("tool-policy", () => { @@ -28,3 +29,13 @@ describe("tool-policy", () => { expect(group).toContain("session_status"); }); }); + +describe("TOOL_POLICY_CONFORMANCE", () => { + it("matches exported TOOL_GROUPS exactly", () => { + expect(TOOL_POLICY_CONFORMANCE.toolGroups).toEqual(TOOL_GROUPS); + }); + + it("is JSON-serializable", () => { + expect(() => JSON.stringify(TOOL_POLICY_CONFORMANCE)).not.toThrow(); + }); +}); diff --git a/src/commands/doctor-memory-search.test.ts b/src/commands/doctor-memory-search.test.ts index 334e0518214..9db631a6fe1 100644 --- a/src/commands/doctor-memory-search.test.ts +++ b/src/commands/doctor-memory-search.test.ts @@ -1,3 +1,4 @@ +import path from "node:path"; import { beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; @@ -25,6 +26,7 @@ vi.mock("../agents/model-auth.js", () => ({ })); import { noteMemorySearchHealth } from "./doctor-memory-search.js"; +import { detectLegacyWorkspaceDirs } from "./doctor-workspace.js"; describe("noteMemorySearchHealth", () => { const cfg = {} as OpenClawConfig; @@ -85,3 +87,12 @@ describe("noteMemorySearchHealth", () => { expect(note).not.toHaveBeenCalled(); }); }); + +describe("detectLegacyWorkspaceDirs", () => { + it("returns active workspace and no legacy dirs", () => { + const workspaceDir = "/home/user/openclaw"; + const detection = detectLegacyWorkspaceDirs({ workspaceDir }); + expect(detection.activeWorkspace).toBe(path.resolve(workspaceDir)); + expect(detection.legacyDirs).toEqual([]); + }); +}); diff --git a/src/commands/doctor-workspace.e2e.test.ts b/src/commands/doctor-workspace.e2e.test.ts deleted file mode 100644 index fb0d46a56e8..00000000000 --- a/src/commands/doctor-workspace.e2e.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import path from "node:path"; -import { describe, expect, it } from "vitest"; -import { detectLegacyWorkspaceDirs } from "./doctor-workspace.js"; - -describe("detectLegacyWorkspaceDirs", () => { - it("returns active workspace and no legacy dirs", () => { - const workspaceDir = "/home/user/openclaw"; - const detection = detectLegacyWorkspaceDirs({ workspaceDir }); - expect(detection.activeWorkspace).toBe(path.resolve(workspaceDir)); - expect(detection.legacyDirs).toEqual([]); - }); -});