mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 13:52:16 +01:00
- 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
24 lines
621 B
TypeScript
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,
|
|
},
|
|
});
|