Skip to content

Commit 9b1034b

Browse files
committed
chore(gates): exclude .fixtures.ts modules from changed-line coverage
runtime.fixtures.ts (packages/platform-android/src) sits outside any __tests__ dir, so vitest's coverage.include picked it up as production source and the changed-line gate scored its 20 unreachable construction lines directly, failing at 39.39% against the 70% threshold. Add '**/*.fixtures.ts' to coverage.exclude (repo-wide convention: 40+ fixture modules, all test support, never production). The file disappears from lcov and scripts/coverage-changed/model.ts's existing excluded-path fallback reports it non-gating instead, with no duplicate classifier needed there. Planted red (targeted run against the real diff/model, not committed): BEFORE (file present in lcov, all added lines uncovered): totalLines=110 coveredLines=0 pct=0 passed=false. AFTER (file absent from lcov post-fix): totalLines=0 excludedTotal=99 excludedReason=excluded-path passed=true. Confirmed against a real `vitest run --coverage` + `check:coverage-changed` pass: runtime.fixtures.ts absent from coverage/lcov.info, gate PASS, 99 lines reported under excluded/excluded-path.
1 parent 7bf05ac commit 9b1034b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ export default defineConfig({
242242
exclude: [
243243
'src/**/*.test.ts',
244244
'src/**/__tests__/**',
245+
'**/*.fixtures.ts',
245246
'src/**/*-types.ts',
246247
'src/**/types.ts',
247248
'src/sdk/**',

0 commit comments

Comments
 (0)