The before/after QP diff (with its null = "no prior award" and null → value "first-time score" semantics) was duplicated in processQualifyingEvent and rescoreTennisBracketAndDetectChanges. The two entry points must stay separate (tennis snapshots before an authoritative delete-all; CS2 preserves rows), but the comparison itself should live in one place. Add diffChangedQualifyingPoints(before, after) in qualifying-points.ts and call it from both paths. Unit-tested directly; the two integration tests still cover the end-to-end behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hq3fG4Zn3unntbSQAGSqCq |
||
|---|---|---|
| .. | ||
| fixtures | ||
| espn-schedule.test.ts | ||
| pandascore.test.ts | ||
| sync-tennis-rescore.test.ts | ||
| tennis-draw-mapping.test.ts | ||
| wikipedia-tennis.test.ts | ||