Files
fusion/plugins/fusion-plugin-dependency-graph/vitest.config.ts
Fusion 0b69b9917e feat(FN-3883): fix dependency-graph plugin exports and add CLI bundle entry
Fixed the `@fusion-plugin/dependency-graph` plugin's exports and build entry points so it bundles correctly with the CLI, added test coverage for plugin enable success and error-state toasts, and included the plugin's dist in the CLI bundle via tsup config.

Fusion-Task-Id: FN-3883
2026-05-09 15:12:13 -07:00

40 lines
1.6 KiB
TypeScript

import { defineConfig } from "vitest/config";
import { fileURLToPath } from "node:url";
import { computeMaxWorkers } from "../../packages/core/src/__test-utils__/vitest-workers";
const maxWorkers = computeMaxWorkers();
export default defineConfig({
resolve: {
alias: [
{
find: /^@fusion-plugin-examples\/dependency-graph\/dashboard-view$/,
replacement: fileURLToPath(new URL("./src/dashboard-view.tsx", import.meta.url)),
},
{
find: /^@fusion-plugin-examples\/dependency-graph$/,
replacement: fileURLToPath(new URL("./src/index.ts", import.meta.url)),
},
{ find: "@fusion/core", replacement: fileURLToPath(new URL("../../packages/core/src/index.ts", import.meta.url)) },
{
find: "@fusion/plugin-sdk",
replacement: fileURLToPath(new URL("../../packages/plugin-sdk/src/index.ts", import.meta.url)),
},
{ find: "@fusion/dashboard", replacement: fileURLToPath(new URL("../../packages/dashboard", import.meta.url)) },
{
find: "lucide-react",
replacement: fileURLToPath(new URL("../../packages/dashboard/node_modules/lucide-react", import.meta.url)),
},
],
},
test: {
include: ["src/**/*.test.{ts,tsx}"],
environment: "jsdom",
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 } },
},
});