Files
livedash-node/vitest.config.mts
Kaj Kowalski 25f6625c4f test: add comprehensive dashboard component tests
- Configure vitest with jsdom environment for React component testing
- Add comprehensive tests for TopQuestionsChart component (6 tests)
- Add comprehensive tests for TranscriptViewer component (7 tests)
- Mock all necessary dependencies (ReactMarkdown, shadcn/ui components)
- All 13 component tests passing successfully
- GeographicMap excluded due to react-leaflet test environment issues
2025-07-12 00:27:48 +02:00

24 lines
621 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
environment: "jsdom",
globals: true,
setupFiles: ["./tests/setup.ts"],
include: ["tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
env: {
NODE_ENV: "test",
},
coverage: {
provider: "v8",
reporter: ["text", "lcov", "html"],
include: ["lib/**/*.ts"],
exclude: ["lib/**/*.d.ts", "lib/**/*.test.ts"],
},
testTimeout: 10000,
},
});