requireEnv has no tests: boot-time env validation is uncovered
Labels / Complexity: testing · Trivial — Trivial
Summary
src/lib/requireEnv.ts (requireEnvStrict) fails fast when required env vars are missing — the same class of boot gate the BackEnd has in validate-env.ts. It has no tests. A regression that lets the app boot without required secrets ships silently and surfaces only in deployment.
Proposal
- Add a spec covering present, missing, and empty-value cases.
Acceptance criteria
- The spec asserts the strict-validation behavior; it passes via
npm test.
Getting started
src/lib/requireEnv.ts — the helper
src/lib/__tests__/ — existing lib test patterns
Commands: npm test.
Good first files to read: src/lib/requireEnv.ts.
requireEnv has no tests: boot-time env validation is uncovered
Labels / Complexity: testing · Trivial — Trivial
Summary
src/lib/requireEnv.ts(requireEnvStrict) fails fast when required env vars are missing — the same class of boot gate the BackEnd has invalidate-env.ts. It has no tests. A regression that lets the app boot without required secrets ships silently and surfaces only in deployment.Proposal
Acceptance criteria
npm test.Getting started
src/lib/requireEnv.ts— the helpersrc/lib/__tests__/— existing lib test patternsCommands:
npm test.Good first files to read:
src/lib/requireEnv.ts.