You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
coverage: a new src/scripts tool always drops integration coverage (nyc all:true) #1298
Measured on PR #1297 (job 044): src/scripts/bench-gate.ts is fully exercised by the unit suite — 37 in-process cases plus 33 spawn cases — and Coveralls records unit coverage +0.3% to 75.356%. The integration job drops 0.6% because .nycrc.json sets "all": true over src/**/*.ts, so every new file under src/ counts against integration coverage even when nothing in the integration suite can reach it.
Both required check jobs pass (Unit Tests And Coverage, Integration Tests and Coverage); only Coveralls' integration status is red, and it is not a required context. So the row merged with a red, unrequired status rather than an unmeasured file.
The decision this needs
Two honest options, and it should be one repo-wide rule rather than a per-job judgement:
Exclude the tool scripts (src/scripts/**) from nyc's include set, so the metric measures the service the tests exercise. Cost: export-events.ts is covered by an integration feature (test/integration/features/compression/compression-roundtrip.feature.ts:160 runs it through a local runCliScript), so excluding the directory drops real coverage of that file too.
Give each tool an integration case, following that precedent. Cost: the helper is local to one feature file and integration tests are cucumber features, so a plain integration spec would need a shared helper first.
Acceptance
The rule is written where a maintainer changing .nycrc.json will read it, and applies to both suites.
Whichever way it goes, the next tool added under src/scripts/ does not need this discussion again.
Activity