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
This commit is contained in:
2025-07-05 15:11:15 +02:00
committed by Kaj Kowalski
parent 8c8f360936
commit 25f6625c4f
2 changed files with 234 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
environment: "node",
environment: "jsdom",
globals: true,
setupFiles: ["./tests/setup.ts"],
include: ["tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],