Files
fusion/packages/dashboard/vitest.config.ts
gsxdsm 07e471db5c feat(KB-648): enable parallel test execution and optimize test performance
- Enable parallel file execution in vitest configs for core, engine, CLI, and dashboard packages
- Optimize backup tests with fake timers for faster, deterministic execution
- Fix SettingsModal temporal dead zone by moving declaration before useCallback
- Fix engine tests with missing git branch delete mock and correct branch names
- Fix git worktree list mock and mission store mock in CLI tests
- Add changeset documenting test optimization patterns
- Update AGENTS.md with test optimization best practices
2026-03-31 23:19:52 -07:00

30 lines
823 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import { resolve } from "node:path";
const maxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? "16", 10);
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@fusion/core": resolve(__dirname, "../core/src/types.ts"),
},
},
test: {
environment: "jsdom",
globals: true,
include: ["app/**/*.test.{ts,tsx}", "src/**/*.test.{ts,tsx}"],
setupFiles: ["./vitest.setup.ts"],
maxWorkers,
fileParallelism: true,
coverage: {
enabled: false,
reporter: ["text", "html", "json"],
reportsDirectory: "./coverage",
include: ["app/**/*.{ts,tsx}", "src/**/*.{ts,tsx}"],
exclude: ["**/*.test.{ts,tsx}", "**/*.d.ts", "dist/**"],
},
},
});