From 8395145ef00811bb45dbffc049ecf65e9d1d6ad1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 10 Aug 2026 03:03:36 -0700 Subject: [PATCH] test: remove duplicate re-export coverage (#121547) --- src/routing/session-key.incognito.test.ts | 22 ---------------------- src/scripts/test-projects.test.ts | 22 ---------------------- 2 files changed, 44 deletions(-) delete mode 100644 src/routing/session-key.incognito.test.ts diff --git a/src/routing/session-key.incognito.test.ts b/src/routing/session-key.incognito.test.ts deleted file mode 100644 index ec5d6843a2ee..000000000000 --- a/src/routing/session-key.incognito.test.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { isIncognitoSessionKey } from "./session-key.js"; - -describe("isIncognitoSessionKey", () => { - it.each([ - "agent:main:dashboard:incognito-1234", - "agent:worker:subagent:incognito-5678", - "agent:main:internal-session-effects:incognito-run-1", - ])("recognizes %s", (sessionKey) => { - expect(isIncognitoSessionKey(sessionKey)).toBe(true); - }); - - it.each([ - "agent:main:dashboard:1234", - "agent:main:dashboard:not-incognito-1234", - "agent:main:subagent:1234", - "dashboard:incognito-1234", - "", - ])("rejects %s", (sessionKey) => { - expect(isIncognitoSessionKey(sessionKey)).toBe(false); - }); -}); diff --git a/src/scripts/test-projects.test.ts b/src/scripts/test-projects.test.ts index 0e02d021b772..2ce87b2dae45 100644 --- a/src/scripts/test-projects.test.ts +++ b/src/scripts/test-projects.test.ts @@ -888,28 +888,6 @@ describe("test-projects args", () => { ]); }); - it("rejects explicit test-support helper files with no importing tests", () => { - const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-test-targets-")); - try { - fs.mkdirSync(path.join(tempDir, "src", "lonely"), { recursive: true }); - fs.writeFileSync( - path.join(tempDir, "src", "lonely", "runtime.test-helpers.ts"), - "export {};\n", - ); - - expect( - findUnmatchedExplicitTestTargets(["src/lonely/runtime.test-helpers.ts"], tempDir), - ).toEqual([ - { - target: "src/lonely/runtime.test-helpers.ts", - reason: "target-matched-no-test-files", - }, - ]); - } finally { - fs.rmSync(tempDir, { recursive: true, force: true }); - } - }); - it("accepts explicit Vitest config targets routed as whole config runs", () => { expect( findUnmatchedExplicitTestTargets(["test/vitest/vitest.contracts-channel-surface.config.ts"]),