mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
test: remove duplicate re-export coverage (#121547)
This commit is contained in:
committed by
GitHub
parent
260628f4fa
commit
8395145ef0
@@ -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);
|
||||
});
|
||||
});
|
||||
@@ -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"]),
|
||||
|
||||
Reference in New Issue
Block a user