Why
src/config/loader.js interpolates ${VAR} from environment variables. This is core to auth/header UX, but currently untested.
Where
src/config/loader.js
- Add:
tests/config/loader.test.js (or similar)
Acceptance Criteria
- When
apidrift.config.json does not exist, loadConfig() returns defaults (empty environments + endpoints + heuristic discovery)
- When config contains
${STAGING_TOKEN}, it is replaced by process.env.STAGING_TOKEN
- When env var is missing, interpolation produces an empty string (current behavior)
- Tests set up and clean up temp working directory (no real files in repo root)
npm test passes
Why
src/config/loader.jsinterpolates${VAR}from environment variables. This is core to auth/header UX, but currently untested.Where
src/config/loader.jstests/config/loader.test.js(or similar)Acceptance Criteria
apidrift.config.jsondoes not exist,loadConfig()returns defaults (empty environments + endpoints + heuristic discovery)${STAGING_TOKEN}, it is replaced byprocess.env.STAGING_TOKENnpm testpasses