Three root causes behind CI run 28695362549 failures: 1. droid-cli: 8 tests fail with 'Failed to resolve entry for @fusion-plugin-examples/droid-runtime'. The droid-cli vitest config had no source alias for the droid-runtime plugin, so Vite tried to resolve non-existent dist/ exports. 2. CLI: multiple tests fail with 'Failed to resolve entry for @fusion-plugin-examples/roadmap'. The CLI vitest config was missing source aliases for the roadmap plugin (., /server, /roadmap-suggestions). 3. CLI: 73 bin.test.ts tests fail with 'No runTaskImportFromGitLab export is defined on the ../commands/task.js mock'. The GitLab import command was added to bin.ts and task.ts but the bin.test.ts mock was not updated to include the new export.
43 lines
1.5 KiB
TypeScript
43 lines
1.5 KiB
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { resolve } from "node:path";
|
|
import { computeMaxWorkers } from "../core/src/__test-utils__/vitest-workers";
|
|
|
|
const maxWorkers = computeMaxWorkers();
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
/*
|
|
FNXC:PluginTests 2026-07-04-09:30:
|
|
droid-cli's index.test.ts imports @fusion-plugin-examples/droid-runtime, but without a source alias Vite tries to resolve the package's dist/ exports which don't exist in a source checkout, causing every droid-cli test to fail with 'Failed to resolve entry for package'.
|
|
*/
|
|
"@fusion-plugin-examples/droid-runtime/probe": resolve(__dirname, "../../plugins/fusion-plugin-droid-runtime/src/probe.ts"),
|
|
"@fusion-plugin-examples/droid-runtime": resolve(__dirname, "../../plugins/fusion-plugin-droid-runtime/src/index.ts"),
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
setupFiles: [
|
|
"./src/__tests__/setup-test-isolation.ts",
|
|
resolve(__dirname, "../core/src/__test-utils__/vitest-setup.ts"),
|
|
],
|
|
globalSetup: [resolve(__dirname, "../core/src/__test-utils__/vitest-teardown.ts")],
|
|
pool: "forks",
|
|
maxWorkers,
|
|
minWorkers: 1,
|
|
fileParallelism: true,
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "json-summary"],
|
|
include: ["src/**/*.ts", "index.ts"],
|
|
exclude: ["src/mcp-schema-server.cjs"],
|
|
thresholds: {
|
|
lines: 92,
|
|
functions: 92,
|
|
branches: 88,
|
|
statements: 92,
|
|
},
|
|
},
|
|
},
|
|
});
|