mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-20 22:40:58 +00:00
22 lines
1.0 KiB
TypeScript
22 lines
1.0 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { isUnitConfigTestFile } from "../vitest.unit-paths.mjs";
|
|
|
|
describe("isUnitConfigTestFile", () => {
|
|
it("accepts unit-config src, test, and whitelisted ui tests", () => {
|
|
expect(isUnitConfigTestFile("src/infra/git-commit.test.ts")).toBe(true);
|
|
expect(isUnitConfigTestFile("test/format-error.test.ts")).toBe(true);
|
|
expect(isUnitConfigTestFile("ui/src/ui/views/chat.test.ts")).toBe(true);
|
|
});
|
|
|
|
it("rejects files excluded from the unit config", () => {
|
|
expect(
|
|
isUnitConfigTestFile("extensions/imessage/src/monitor.shutdown.unhandled-rejection.test.ts"),
|
|
).toBe(false);
|
|
expect(isUnitConfigTestFile("src/agents/pi-embedded-runner.test.ts")).toBe(false);
|
|
expect(isUnitConfigTestFile("src/commands/onboard.test.ts")).toBe(false);
|
|
expect(isUnitConfigTestFile("ui/src/ui/views/other.test.ts")).toBe(false);
|
|
expect(isUnitConfigTestFile("src/infra/git-commit.live.test.ts")).toBe(false);
|
|
expect(isUnitConfigTestFile("src/infra/git-commit.e2e.test.ts")).toBe(false);
|
|
});
|
|
});
|