Deterministic fixtures for stats calculations #43

Open
opened 2026-09-26 13:58:42 +00:00 by belvedere · 0 comments
Collaborator

Objective: Stats are where silent wrongness hides; pin them down.

Files:

  • Create: test/support/review_fixtures.ex
  • Create: test/first_thousand_words/study/stats_test.exs

Steps:

  1. A builder that generates reviews across a known date range with known grades.
  2. Assert mastery buckets, retention, streak and forecast buckets against hand-computed values.
  3. Include a timezone-boundary case for Europe/London.

Verify: mix test test/first_thousand_words/study/stats_test.exs — all pass.

**Objective:** Stats are where silent wrongness hides; pin them down. **Files:** - Create: `test/support/review_fixtures.ex` - Create: `test/first_thousand_words/study/stats_test.exs` **Steps:** 1. A builder that generates reviews across a known date range with known grades. 2. Assert mastery buckets, retention, streak and forecast buckets against hand-computed values. 3. Include a timezone-boundary case for Europe/London. **Verify:** `mix test test/first_thousand_words/study/stats_test.exs` — all pass.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nickkeers/first-thousand-words#43
No description provided.