[FEAT] Add tests for src/components/StatsBar.tsx

Open Beginner friendly
#129 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
react-native, typescript
Domain
mobile, testing

Research direction

Start with src/components/StatsBar.tsx, then review existing tests in src/utils/__tests__ and src/store/__tests__ for project conventions and examples of mocking timers and storage. Add component tests for rendering, props, state changes, edge cases, and applicable interactions; done when these behaviors are covered and the tests pass.

Written by the indexing model from the issue text.

Description

enhancement good first issue help wanted

Is your feature request related to a problem? Please describe.

Our overall test coverage is currently low (~18%). To ensure app stability and prevent regressions, we need to increase test coverage across the codebase. This issue is part of the broader Epic to test Module 2: Core UI Components.

Describe the solution you'd like

Add unit/component tests for src/components/StatsBar.tsx using Jest and React Native Testing Library.

  • Verify the component/hook renders or initializes correctly.
  • Test props, state changes, and edge cases.
  • Test user interactions if applicable.

Describe alternatives you've considered

N/A

Additional Context

This is a sub-task of #121 [EPIC] Increase Test Coverage.
Check the existing tests in src/utils/__tests__ and src/store/__tests__ for inspiration on how we mock timers and storage.

Dominant language
TypeScript
Stars
4
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GiZano/LevelUp

All issues in GiZano/LevelUp

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.