Skip to content

✨ [FEATURE] Write Unit Test Cases for Frontend with 95%+ Coverage #20

@dev-madhurendra

Description

@dev-madhurendra

πŸš€ Feature Description

Implement comprehensive unit tests for all React components, hooks, and utilities to achieve 95%+ test coverage across the frontend codebase.

πŸ’‘ Why is this needed?

  • Ensures UI logic and interactions work as intended
  • Catches breaking changes before deployment
  • Improves maintainability and developer confidence
  • Supports CI/CD pipelines with strong quality gates

βœ… Additional Context

  • Use Jest and React Testing Library (or the project’s configured test framework)

  • Test both rendering and user interactions

  • Include edge cases, error states, and conditional rendering paths

  • Coverage should be verified using --coverage in the test command

  • Exclude only static assets, constants, and auto-generated files from coverage

  • Target areas:

    • Atoms – Buttons, Inputs, Icons, etc.
    • Molecules – Forms, Cards, Modals
    • Organisms – Header, Footer, Navigation
    • Pages – Login, Dashboard, Profile
    • Custom Hooks and Utility Functions

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions