Logo
Explore Help
Sign In
radziel/spotlightcam
1
0
Fork 0
You've already forked spotlightcam
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
34f18b3b50596052b68e143fae4cb8ad099efc22
spotlightcam/backend/jest.setup.js

6 lines
160 B
JavaScript
Raw Normal View History

test(ratings): add comprehensive E2E test for ratings & stats flow Add end-to-end test verifying the complete ratings and stats update flow: - Auto match creation from suggestion acceptance - Both users rating each other - Stats updated exactly once (recordingsDone/recordingsReceived) - Manual matches do NOT update stats - Double-rating prevention (idempotency) Test coverage (9 scenarios): - STEP 1-3: Event creation, user enrollment, heat declaration - STEP 4: Matching algorithm execution + saveMatchingResults fix - STEP 5: Suggestion acceptance creates auto match (source='auto') - STEP 6a: First rating (no stats update yet) - STEP 6b: Second rating triggers stats update + match completion - STEP 7: Verify duplicate rating prevention - STEP 8: Verify manual matches don't affect fairness stats Infrastructure: - Add jest.setup.js to load .env.development for all tests - Update package.json to use setupFilesAfterEnv Documentation: - Mark S10 (Ratings & Stats) as ✅ IMPLEMENTED in TODO.md - Remove from Critical Gaps section - Add detailed implementation references All tests passing ✅
2025-11-30 19:18:09 +01:00
/**
* Jest setup file - runs before all tests
* Loads environment variables from .env.development
*/
require('dotenv').config({ path: '.env.development' });
Reference in New Issue Copy Permalink
Powered by Gitea
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API