Files
fusion/plugins/fusion-plugin-openclaw-runtime/vitest.config.ts
Fusion 3ca4209757 feat(FN-3193): split-pane redesign of agents workspace with mobile support
Merges FN-3122's agents workspace redesign (split-pane layout, mobile responsiveness) and FN-3193's test infrastructure stabilization. The AgentsView and AgentDetailView components received major style and layout updates, with corresponding test coverage added. Several vitest config entries were con

Fusion-Task-Id: FN-3193
2026-05-02 04:18:03 -07:00

24 lines
1.0 KiB
TypeScript

import { defineConfig } from "vitest/config";
import { fileURLToPath } from "node:url";
const requestedMaxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? "2", 10);
const maxWorkers = Math.max(1, Math.min(4, Number.isFinite(requestedMaxWorkers) ? requestedMaxWorkers : 2));
process.env.VITEST_MAX_WORKERS = String(maxWorkers);
export default defineConfig({
resolve: {
alias: {
"@fusion/core": fileURLToPath(new URL("../../packages/core/src/index.ts", import.meta.url)),
"@fusion/plugin-sdk": fileURLToPath(new URL("../../packages/plugin-sdk/src/index.ts", import.meta.url)),
},
},
test: {
include: ["src/**/*.test.ts"],
setupFiles: [fileURLToPath(new URL("../../packages/core/src/__test-utils__/vitest-setup.ts", import.meta.url))],
globalSetup: [fileURLToPath(new URL("../../packages/core/src/__test-utils__/vitest-teardown.ts", import.meta.url))],
pool: "threads",
maxWorkers,
poolOptions: { threads: { minThreads: 1, maxThreads: maxWorkers }, forks: { minForks: 1, maxForks: maxWorkers } },
},
});