Files
fusion/packages/tui/vitest.config.ts
Fusion 44caaa45d9 fix(FN-2055): harden node test utilities and import resolution
- Convert seed-sample-nodes into a test-only helper and remove direct execution against the real central database
- Replace private-looking host examples with RFC 5737 test-net addresses in node connection docs and ConnectNodeModal expectations
- Add Vitest aliases for @fusion/core and @fusion/engine to stabilize cross-package test imports
- Load AgentReflectionService via local engine source path in in-process runtime to avoid alias resolution failures
2026-04-18 12:21:14 -07:00

29 lines
918 B
TypeScript

import { defineConfig } from "vitest/config";
import { availableParallelism } from "node:os";
import { fileURLToPath } from "node:url";
const defaultMaxWorkers = Math.max(1, Math.min(2, Math.ceil(availableParallelism() / 8)));
const maxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? String(defaultMaxWorkers), 10);
const coreSourceEntry = fileURLToPath(new URL("../core/src/index.ts", import.meta.url));
export default defineConfig({
resolve: {
alias: {
"@fusion/core": coreSourceEntry,
},
},
test: {
include: ["src/**/*.test.ts", "src/**/*.test.tsx"],
passWithNoTests: true,
maxWorkers,
fileParallelism: true,
coverage: {
enabled: false,
reporter: ["text", "html", "json"],
reportsDirectory: "./coverage",
include: ["src/**/*.ts", "src/**/*.tsx"],
exclude: ["**/*.test.ts", "**/*.test.tsx", "**/*.d.ts", "dist/**"],
},
},
});