oss-slu/image-recognition-integration-system
[FEATURE]: Add unit tests for indexedDbHelpers
Ouverte
#62 ouverte le 1 sept. 2025
enhancementgood first issuehacktoberfest
Métriques du dépôt
- Stars
- (4 étoiles)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
Scenario
Given the indexedDbHelpers.ts utility provides CRUD functions for images in IndexedDB,
When developers write unit tests for each helper function,
Then data persistence, retrieval, and error handling should be verified with automated tests.
Acceptance Criteria
- Test suite
tests/indexedDbHelpers.test.tscreated. - Covers all CRUD helper functions.
- Create
- Read
- Update
- Delete
- Tests pass locally and in CI.
- Documentation/comments in test file for future contributors.
Additional Context
Reference file: utils/indexedDbHelpers.ts
Jest testing framework documentation https://jestjs.io/docs/getting-started
IndexedDB documentation: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
IndexedDB is used in:
- https://github.com/oss-slu/image-recognition-integration-system/blob/main/app/utils/indexedDbHelpers.ts
- https://github.com/oss-slu/image-recognition-integration-system/blob/main/app/components/cameraButton.tsx
- https://github.com/oss-slu/image-recognition-integration-system/blob/main/app/imageGallery/page.tsx