mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-10 15:49:25 -05:00
Fix the feedback data round-trip end-to-end: - QuestionFeedback: dedup guard, aria-pressed, hydrate previous feedback on mount, wire Report/Suggest to analytics events - analytics.ts: computeSummary() aggregates thumbs and difficulty with last-write-wins dedup per question+session - dashboard: new thumbs ratio and difficulty distribution panels - gauntlet: add QuestionFeedback to per-question review - progress.ts: include analytics in export/import - worker.js: server-side summary aggregates feedback with dedup Add Vitest test infrastructure (34 journey tests across 2 files) and embed type-check + test steps in both CI deploy workflows so tests gate every build before deployment.
19 lines
400 B
TypeScript
19 lines
400 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/__tests__/setup.ts'],
|
|
include: ['src/**/*.test.{ts,tsx}'],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
});
|