24 lines
657 B
TypeScript
24 lines
657 B
TypeScript
import os from "node:os";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
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: {
|
|
pool: "forks",
|
|
maxWorkers: e2eWorkers,
|
|
include: ["test/**/*.e2e.test.ts", "src/**/*.e2e.test.ts"],
|
|
setupFiles: ["test/setup.ts"],
|
|
globalSetup: ["test/global-setup.ts"],
|
|
exclude: [
|
|
"dist/**",
|
|
"apps/macos/**",
|
|
"apps/macos/.build/**",
|
|
"**/vendor/**",
|
|
"dist/Clawdbot.app/**",
|
|
],
|
|
},
|
|
});
|