Skip to content

[Bug] : Add unit tests for StreakCounter component #3599

@paridhijain153

Description

@paridhijain153

Description

The StreakCounter component currently lacks dedicated unit tests. This component is responsible for displaying attendance streak information, including the streak count, singular/plural day formatting, and visual streak indicator. Adding tests will help ensure the displayed streak information remains accurate during future changes.

Steps to Reproduce

  1. Navigate to components/gamification/StreakCounter.jsx.
  2. Check the existing test suite.
  3. Observe that no dedicated test file exists for this component.
  4. Notice there is no automated coverage validating its rendering and streak count behavior.

Expected Behavior

A test suite should verify:

  • Attendance streak label renders correctly.
  • Fire emoji indicator is displayed.
  • Singular day format is used for a streak of 1.
  • Plural day format is used for streaks greater than 1.
  • Default streak value is displayed when no prop is provided.

Screenshots

Not applicable.

Environment

  • OS: Windows, macOS, Linux
  • Browser: Chrome, Firefox, Safari
  • Version: Latest supported versions

Metadata

Metadata

Labels

GSSoC'26Part of GirlScript Summer of Code 2026bugSomething isn't workingmentor:Ayushh-SharmaaGSSoC: Mentor — @Ayushh-Sharmaa

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions