Setting up locally, debugging failures, or adding tests.
npm test— Runspretest(→npm run build) then Jest with coverage. Buildsdist/and ensuresregions.jsonflow runs.npm run test:debug— Jest--watchAllin--runInBandmode.
- No API keys or
.envfor tests—all unit tests with fixtures under__test__/mock/. - First-time or clean machines: if
src/assets/regions.jsonis missing,prebuildattemptsdownload-regions; failures print a warning—seeAGENTS.md/ package.jsondownload-regions.
- Tests live in
__test__/**/*.test.ts(seejest.config.tstestMatch). - Reuse
__test__/mock/patterns (entry-mock.ts,json-element-mock.ts, etc.).
- Coverage:
reports/coverage/ - HTML summary:
reports/html/ - JUnit:
reports/junit/ - CI consumes junit / coverage patterns in
.github/workflows/ci.ymlandcode.cov.yml.
- Prefer explicit mock objects over live fetches—this package does not ship an HTTP client; do not introduce network calls in tests unless the project later adds gated integration tests.