Files
cs249r_book/interviews/staffml/vitest.config.ts
Vijay Janapa Reddi 5955e4a9e2 feat(staffml): complete feedback pipeline with tests and CI
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.
2026-04-05 13:19:02 -04:00

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'),
},
},
});