-
-
Notifications
You must be signed in to change notification settings - Fork 957
Open
Labels
⭐ goal: additionAddition of new featureAddition of new feature💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🚦status: awaiting triageHas not been triaged & therefore, not ready for workHas not been triaged & therefore, not ready for work
Description
Contributor Guidelines
- I have read the guidelines and discussion
Is your feature request related to a problem? Please describe.
The entire codebase has only 2 unit test files (both in src/plays/savings-calculator/). Critical infrastructure like custom hooks, utility functions, service layers, and the search/filter system have zero test coverage. The testing framework (Jest + React Testing Library) is properly configured but barely utilized.
Describe the solution you'd like.
- Write unit tests for all custom hooks using
@testing-library/react-hooks - Write unit tests for utility functions (
commonUtils.js,formatCount.ts,coverImageUtil.js) - Write tests for the search query parser (
search-helper.js→ParseQuery,QueryDBTranslator) - Write integration tests for service functions with mocked GraphQL responses
- Establish a test coverage threshold (e.g., 60% for
src/common/) in CI
Affected Files:
src/common/hooks/useFetch.js— no testssrc/common/hooks/useCacheResponse.ts— no testssrc/common/hooks/useContributors.js— no testssrc/common/hooks/useFeaturedPlays.js— no testssrc/common/hooks/useGitHub.js— no testssrc/common/hooks/useLikePlays.js— no testssrc/common/hooks/useLocalStorage.js— no testssrc/common/utils/commonUtils.js— no testssrc/common/utils/formatCount.ts— no testssrc/common/services/plays.js— no testssrc/common/search/search-helper.js— no tests
Describe alternatives you've considered.
No alternative required
Screenshot / Screenshare
No response
Additional context
No response
Record
- I have checked the existing issues
- I have read the Contributing Guidelines
- I want to work on this issue
- I am a Hacktoberfest contributor
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
⭐ goal: additionAddition of new featureAddition of new feature💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🚦status: awaiting triageHas not been triaged & therefore, not ready for workHas not been triaged & therefore, not ready for work