Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 2.26 KB

testing.md

File metadata and controls

27 lines (20 loc) · 2.26 KB

Testing

Ordinary tests use the deterministic local provider and real in-memory or file-backed components. They do not replace runtime dependencies or suppress logging. The gate entry point is ./run.sh; see the validation gate for every arm.

./run.sh                  # fast arm: types, lint, format, unit tests, docs
./run.sh test:fast        # tests/unit only
./run.sh test:full        # unit and integration suites with coverage
./run.sh all              # ordinary gate (same arms as npm run validate)
./run.sh live             # live OpenAI suite; explicit credentials required
Suite Selection Notes
tests/unit npm run test:fast Focused suites; the fastest check while editing.
tests/integration npm run test:integration Coordinator and HTTP end-to-end paths.
Both offline suites npm test Network-free ordinary run; excludes tests/live.
Both offline suites with coverage npm run test:coverage Enforces 90% lines and 80% branches; writes coverage/jest-results.json and coverage/coverage-summary.json.
tests/live npm run test:live Requires NOORG_LLM_PROVIDER=openai and OPENAI_API_KEY; never part of the default arm or all.

npm run validate runs the all arm: type check, lint, formatting, the coverage-augmented test run, repository/documentation/units/contract/decision validators, the OpenAPI check, and the build. npm run release:check is the publication gate: it adds the executable example, the high-severity dependency audit, full manuscript generation and rendering, and git diff --check.

Coverage is enforced at 90% lines and 80% branches by Jest, inside the test:full arm, so a coverage regression fails the same arm as a failing test. The coverage command remains local and deterministic; live provider checks are never part of the ordinary validation command.

Measured wall time per arm, with the test and coverage evidence of the measured run, lives in _generated/gate-timings.md. It is generated by ./run.sh report; never edit it by hand.

The manuscript check clears its generated output before starting and removes partial output on failure, so interrupted release runs cannot become a later evidence source.