Add tests for calibration and game test utilities - #15
Conversation
- Add mathUtils tests for regression algorithms (leastSquares, ridgeRegression) - Add dotCalibration tests for calibration point calculations - Add detectSaccade tests for velocity and saccade detection - Add accuracy tests for ROI, gain calculation, and ADHD markers Total: 84 new tests across 4 test suites
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||||
… utils - Remove gameTest folder (accuracy.test.js, detectSaccade.test.js) - Move calibration tests to src/__tests__/utils/calibration/ - Maintains consistency with other utility test organization
User description
Total: 67 new tests across 4 test suites
PR Type
Tests
Description
Add 84 comprehensive tests across 4 test suites for calibration and game test utilities
Test calibration point calculations, data structures, and iris position detection
Test regression algorithms (leastSquares, ridgeRegression) and mathematical functions
Test saccade detection, velocity calculations, and binocular validation
Test accuracy metrics including ROI, gain calculation, fixation stability, and ADHD markers
Diagram Walkthrough
File Walkthrough
dotCalibration.test.js
Calibration point and iris position detection testssrc/tests/calibration/dotCalibration.test.js
normalized coordinates
eye
products
mathUtils.test.js
Regression algorithms and calibration math testssrc/tests/calibration/mathUtils.test.js
solving
detectSaccade.test.js
Saccade detection and velocity calculation testssrc/tests/gameTest/detectSaccade.test.js
ranges
velocity
pro/anti-saccades
accuracy.test.js
Accuracy metrics and ADHD marker detection testssrc/tests/gameTest/accuracy.test.js
tracker FPS
velocity checks
detection
scoring