Ny automatisk testsvit för träningslogiken.
This commit is contained in:
@@ -2028,11 +2028,30 @@ Mitigation:
|
||||
- treat backend hydration and local dirty flags as runtime concerns
|
||||
- inspect `src/runtime_services.js` together with the affected save path
|
||||
|
||||
## 18. Recommended Future Additions
|
||||
## 18. Automated Regression Tests
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
|
||||
`tests/training_logic.test.js` covers:
|
||||
- training-state normalization and duplicate rejection
|
||||
- invalid, anonymous, and sub-500 ms lap exclusion
|
||||
- replacement of current-session ledger rows after corrections
|
||||
- retention of archived/deleted-session history
|
||||
- per-driver isolation and day/session aggregation
|
||||
- recommendation branch selection
|
||||
- custom goal and automatic milestone progress
|
||||
|
||||
The suite uses Node's built-in `node:test` runner and does not add a test-framework dependency. Windows PowerShell/CMD can run the same suite with `npm.cmd test`.
|
||||
|
||||
## 19. Recommended Future Additions
|
||||
|
||||
If the project grows further, the next useful additions to this document are:
|
||||
- exact `resultsBySession` competitor row schema
|
||||
- exact `settings` schema snapshot
|
||||
- SQLite table contract section
|
||||
- controller-to-view ID map for critical forms/buttons
|
||||
- test checklist per module
|
||||
- additional test checklists for race generation, timing, judging, and persistence modules
|
||||
|
||||
Reference in New Issue
Block a user