Background
SeasonsService.create (src/seasons/seasons.service.ts) should prevent
creating two seasons with overlapping [starts_at, ends_at] windows. If both
were active simultaneously, leaderboard points would accrue to two seasons at
once. There are no tests verifying this overlap check.
Goal
Add overlap-rejection tests in src/seasons/seasons.service.spec.ts.
Requirements
- Seed an active season
[100, 200].
- Attempt to create:
[150, 250] (starts inside existing) → error.
[50, 150] (ends inside existing) → error.
[120, 180] (fully inside existing) → error.
[200, 300] (starts exactly at existing end) → success.
- Finalize the existing season; attempt
[150, 250] again → success.
Acceptance criteria
- Overlapping seasons are rejected.
- Non-overlapping creation succeeds.
Background
SeasonsService.create(src/seasons/seasons.service.ts) should preventcreating two seasons with overlapping
[starts_at, ends_at]windows. If bothwere active simultaneously, leaderboard points would accrue to two seasons at
once. There are no tests verifying this overlap check.
Goal
Add overlap-rejection tests in
src/seasons/seasons.service.spec.ts.Requirements
[100, 200].[150, 250](starts inside existing) → error.[50, 150](ends inside existing) → error.[120, 180](fully inside existing) → error.[200, 300](starts exactly at existing end) → success.[150, 250]again → success.Acceptance criteria