feat(#2): Challenge mode with multi-user leaderboards #10

Merged
ti-paul merged 1 commit from feature/2-challenge-mode into main 2026-06-12 03:10:22 +00:00
Member

Closes #2

New: src/challenge.js

  • Create/manage challenges with participants
  • Score tracking, leaderboards, progress bars
  • ASCII rendering + JSON export

Bug fix

  • Fixed streaks.test.js hardcoded dates (3 previously failing tests now pass)

25 tests. 99 total pass.

Closes #2 ## New: src/challenge.js - Create/manage challenges with participants - Score tracking, leaderboards, progress bars - ASCII rendering + JSON export ## Bug fix - Fixed streaks.test.js hardcoded dates (3 previously failing tests now pass) 25 tests. **99 total pass.**
feat(#2): challenge mode with multi-user leaderboards
Some checks failed
CI / test (pull_request) Failing after 0s
3a8bcb64b3
New module src/challenge.js:
- createChallenge: configurable duration, participants, start date
- updateScore: track participant progress
- getLeaderboard: sorted rankings with score bars
- getProgress: elapsed/remaining days, progress bar
- renderLeaderboard/renderProgress: ASCII output
- exportChallenge: JSON export with leaderboard
- endChallenge: mark completed

Bug fix: streaks.test.js used hardcoded 2026-05 dates that fell
outside the 4-week window from current date. Replaced with daysAgo().

25 new tests. All 99 tests pass. Closes #2.
ti-paul left a comment
No description provided.
25 tests, 99 total. Fixed 3 pre-existing test bugs. LGTM.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
les_clankeurs/git-habit-tracker!10
No description provided.