- Add an effective node resolver with task override, project default, and local fallback precedence. - Wire scheduler dispatch to persist effectiveNodeId/effectiveNodeSource and log resolved node routing. - Add coverage for effective node resolution and scheduler node routing integration behavior. - Stabilize workspace test resolution by adding @fusion/core and @fusion/plugin-sdk aliases across Vitest configs.
22 lines
772 B
TypeScript
22 lines
772 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { cpus } from "node:os";
|
|
|
|
const defaultMaxWorkers = Math.max(1, cpus().length - 1);
|
|
const requestedMaxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? String(defaultMaxWorkers), 10);
|
|
const maxWorkers = Math.max(1, Number.isFinite(requestedMaxWorkers) ? requestedMaxWorkers : defaultMaxWorkers);
|
|
process.env.VITEST_MAX_WORKERS = String(maxWorkers);
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@fusion/core": new URL("../core/src/index.ts", import.meta.url).pathname,
|
|
},
|
|
},
|
|
test: {
|
|
include: ["src/**/*.test.ts"],
|
|
pool: "threads",
|
|
maxWorkers,
|
|
poolOptions: { threads: { minThreads: 1, maxThreads: maxWorkers }, forks: { minForks: 1, maxForks: maxWorkers } },
|
|
},
|
|
});
|