♻️ Run doc tests outside the coverage gate
An example that exercises a line no hand-written test reaches would let the `--100` gate pass on documentation alone. Node has no file-level exclusion, and c8's `--exclude` only filters the report, so run the two in separate processes: `test:coverage` runs c8 over the tracked tests only (`git ls-files`, which skips the untracked generated files), and `test:doc` runs the generated examples without c8. `test:ci` chains them.
This commit is contained in:
1 parent
a9b588e1c3
commit
4dc58395c0
3 files changed
+12
-3
No files matched your search
+3
-2
@@ -140,8 +140,9 @@ CI step. Pick the prefix that matches the script's lifecycle:
|
||||
`npm run fix`; the diff is the review surface.
|
||||
- `test:*` — test scripts. `test` is the canonical entry point (`check:tsc` +
|
||||
unit tests); `test:unit` skips the typecheck for fast local iteration;
|
||||
`test:ci` runs the suite under c8 and fails below 100% coverage on `src/`
|
||||
(CI-only; `verify` stays coverage-free).
|
||||
`test:coverage` runs c8 over the hand-written tests only; `test:doc` runs the
|
||||
generated doc examples without coverage; `test:ci` chains the two and fails
|
||||
below 100% coverage on `src/` (CI-only; `verify` stays coverage-free).
|
||||
- `watch:*` — long-running watchers for the manual inner dev loop. Aggregated by
|
||||
`watch`.
|
||||
- `maintain:*` — advisory repo-maintenance scans: read-only, but whole-project
|
||||
|
||||
Reference in new issue
Block a user