Skip to content

test: add swechalogo and peerreviewcard

Vemuri priya requested to merge test/swechalogo-page into test_cases

Description:

This merge request introduces comprehensive unit test cases for the SwechaLogo , PeerReviewCard and MediaGridItem components to improve overall test coverage and ensure consistent UI behavior. The tests validate proper rendering of components, correct handling of props, and graceful behavior in edge cases such as missing or incomplete data.

By adding these tests, the reliability and maintainability of the codebase are enhanced, helping to prevent regressions during future updates and ensuring that UI components function as expected across different scenarios.


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-04-09_15-13-10

Additionally:

  • Updated vitest.config.ts to include @ path alias for proper module resolution in tests
  • Fixed all ESLint issues (e.g., using const, handling intentional any)
  • Ensured all tests pass successfully with no warnings or errors

Commands used:

  • npm run test:run -- tests/src/components/
  • npm run test:coverage
  • npm run lint -- tests/src/components/*.test.tsx

This significantly improves test coverage, reduces regression risk, and ensures confidence during future code changes.

Checklist:

  • Code follows project style guidelines
  • Self-review completed to ensure accuracy and quality
  • No console errors or warnings observed during testing
  • TypeScript types are properly defined and validated

Closes #252 (closed)

Edited by Vemuri priya

Merge request reports

Loading