Skip to content

test:test coverage for the components and services folder

Pavani Pothuganti requested to merge AiHacksdays/card into AI-HackDays

Description:

Added and enhanced unit test cases to improve overall test coverage for both components and services modules.

  • Improved coverage in src/components/ by:
    • Adding new test cases for HackdayProjectCard (previously 0% coverage)
    • Increasing branch coverage for SummerCard
    • Adding edge case and interaction tests for Navbar and Initiatives
  • Improved coverage in src/services/api.ts by:
    • Covering previously untested lines (error handling scenarios)
    • Validating API success and failure responses
  • Followed existing test patterns using Vitest + React Testing Library
  • Covered:
    • Rendering
    • Props handling
    • Conditional rendering
    • User interactions
    • Error handling

Type of Change:

  • Bug Fix
    • Feature Development
    • Documentation

Testing:

  • Tested on desktop
    • Tested on mobile
    • Tested in different browsers

Screenshots (if applicable):

Screenshot from 2026-03-26 14-38-01.png

Screenshot from 2026-03-26 16-10-19.png


Video Demo

Not applicable


Checklist:

  • Code follows project style guidelines
    • Self-review completed
    • No console errors
    • TypeScript types are correct

Related to #41 (closed)

Merge request reports

Loading