Commit Graph

3 Commits

Author SHA1 Message Date
Antoni Nuñez Romeu 20cc399731 fix: add missing mocks for off-service.js and searchOTC in backend tests
Run Tests on Branches / Detect Changes (push) Successful in 14s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
The backend test was hanging in CI because server.js imports off-service.js
which pulls in redis-client.js. Without a mock, it tries to connect to Redis
at import time, hanging indefinitely in CI where no Redis server exists.

Also added the missing searchOTC mock for cima-service.js to fix the
SyntaxError from the export mismatch.
2026-07-13 21:10:06 +02:00
Antoni Nuñez Romeu e48ef31fee feat(backend): add Open Food Facts service with Redis caching
- transformOFFProduct: maps OFF products to unified Product model
- searchBabyProducts: searches baby products via OFF API (1h cache)
- getBabyProductDetails: fetches product details by barcode (1h cache)
- 9 tests passing for transform logic and input validation
2026-07-13 20:58:40 +02:00
Antoni Nuñez Romeu 190b3d163d Restructure with Turborepo
Run Tests on Branches / Backend Tests (push) Successful in 3m38s
Run Tests on Branches / Frontend Tests (push) Successful in 3m28s
2026-07-06 15:51:53 +02:00