Files
manage/frontend/vitest.config.ts
T
Developer dd778d8850 feat(frontend): slice 1 — foundation for MUI->shadcn migration
Web UI rework (openspec/changes/web-ui-rework). Foundation slice:
- Add @tanstack/react-table; remove orphaned recharts, d3
- Vendor shadcn primitives: tabs table dialog input label checkbox
  switch progress separator avatar textarea dropdown-menu scroll-area
- Add Vitest + @testing-library/react + jsdom harness; npm test script
- Delete no-op theme.ts shim; remove getAppTheme references
- Smoke test proves the harness

Gate: build + lint + test green.
2026-06-17 12:11:05 +00:00

23 lines
673 B
TypeScript

import path from "path";
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
// Vitest harness config (kept separate from vite.config.ts).
// The `@` alias mirrors tsconfig.app.json (`"@/*": ["./src/*"]`).
// test.include scopes Vitest to src/** component tests only; it must NOT claim
// the frontend/tests/*.mjs node:test suites (run those via `npm run test:node`).
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
test: {
environment: "jsdom",
globals: true,
setupFiles: ["./src/test/setup.ts"],
include: ["src/**/*.{test,spec}.{ts,tsx}"],
},
});