test: add swechalogo and peerreviewcard
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
Additionally:
- Updated
vitest.config.tsto include@path alias for proper module resolution in tests - Fixed all ESLint issues (e.g., using
const, handling intentionalany) - Ensured all tests pass successfully with no warnings or errors
Commands used:
npm run test:run -- tests/src/components/npm run test:coveragenpm 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
