Files
openclaw/vitest.e2e.config.ts

24 lines
657 B
TypeScript
Raw Normal View History

2026-01-20 09:40:07 +00:00
import os from "node:os";
import { defineConfig } from "vitest/config";
2026-01-20 09:40:07 +00:00
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
const cpuCount = os.cpus().length;
const e2eWorkers = isCI ? 2 : Math.min(4, Math.max(1, Math.floor(cpuCount * 0.25)));
export default defineConfig({
test: {
2026-01-20 09:40:07 +00:00
pool: "forks",
maxWorkers: e2eWorkers,
2026-01-23 18:31:33 +00:00
include: ["test/**/*.e2e.test.ts", "src/**/*.e2e.test.ts"],
setupFiles: ["test/setup.ts"],
2026-01-23 18:31:33 +00:00
globalSetup: ["test/global-setup.ts"],
exclude: [
"dist/**",
"apps/macos/**",
"apps/macos/.build/**",
"**/vendor/**",
2026-01-04 14:32:47 +00:00
"dist/Clawdbot.app/**",
],
},
});