Background
OracleService.getPendingMatches (src/oracle/oracle.service.ts) queries
matches where match_time < now AND result_submitted = false. There are no
tests verifying that:
- Matches with
match_time > now (future) are excluded.
- Matches with
result_submitted = true are excluded.
- Only the intersection (past AND unsubmitted) is returned.
Goal
Add tests in src/oracle/oracle.service.spec.ts (create if absent).
Requirements
- Seed four matches:
- Past + unsubmitted → included.
- Past + submitted → excluded.
- Future + unsubmitted → excluded.
- Future + submitted → excluded.
- Assert only the first match appears in the results.
- Assert
total = 1 in the paginated response.
Acceptance criteria
- Only past + unsubmitted matches returned.
time_since_match_started_seconds is non-negative and approximately correct.
Background
OracleService.getPendingMatches(src/oracle/oracle.service.ts) queriesmatches where
match_time < nowANDresult_submitted = false. There are notests verifying that:
match_time > now(future) are excluded.result_submitted = trueare excluded.Goal
Add tests in
src/oracle/oracle.service.spec.ts(create if absent).Requirements
total = 1in the paginated response.Acceptance criteria
time_since_match_started_secondsis non-negative and approximately correct.