Utils module has no tests: validate-env and shared helpers are uncovered
Labels / Complexity: testing · Trivial — Trivial
Summary
src/utils/ (1 file, validate-env.ts) holds the boot-time env validation that decides whether the app starts — including the JWT_SECRET/JWT_REFRESH_SECRET requirement list. It has no tests. A regression that lets the app boot without required secrets (or blocks boot on valid config) ships silently and only surfaces in deployment.
Proposal
- Add a spec covering valid config, missing required vars, and invalid values for
validate-env.ts.
Acceptance criteria
- The spec passes and runs in CI via
npm test.
- Coverage for
src/utils/ is reported via npm run test:cov.
Getting started
src/utils/validate-env.ts — the validation to cover
test/unit/ — the mock-based pattern
Commands: npm test, npm run test:cov.
Good first files to read: src/utils/validate-env.ts, test/unit/search-facets.service.spec.ts.
Utils module has no tests: validate-env and shared helpers are uncovered
Labels / Complexity: testing · Trivial — Trivial
Summary
src/utils/(1 file,validate-env.ts) holds the boot-time env validation that decides whether the app starts — including theJWT_SECRET/JWT_REFRESH_SECRETrequirement list. It has no tests. A regression that lets the app boot without required secrets (or blocks boot on valid config) ships silently and only surfaces in deployment.Proposal
validate-env.ts.Acceptance criteria
npm test.src/utils/is reported vianpm run test:cov.Getting started
src/utils/validate-env.ts— the validation to covertest/unit/— the mock-based patternCommands:
npm test,npm run test:cov.Good first files to read:
src/utils/validate-env.ts,test/unit/search-facets.service.spec.ts.