From 06f9fdb2b1feee6f592e8aa686176009961590c5 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 19:58:43 -0300 Subject: [PATCH 01/10] fix: prevent filtered files from being tracked in fileIndex --- lib/report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/report.js b/lib/report.js index 1fa51dfc..fd68c7e7 100644 --- a/lib/report.js +++ b/lib/report.js @@ -487,7 +487,6 @@ class Report { if (/^file:\/\//.test(v8ScriptCov.url)) { try { v8ScriptCov.url = fileURLToPath(v8ScriptCov.url) - fileIndex.add(v8ScriptCov.url) } catch (err) { debuglog(`${err.stack}`) continue @@ -496,6 +495,7 @@ class Report { if ((!this.omitRelative || isAbsolute(v8ScriptCov.url))) { if (this.excludeAfterRemap || this._shouldInstrument(v8ScriptCov.url)) { result.push(v8ScriptCov) + fileIndex.add(v8ScriptCov.url) } } } From 37900fbc89330e962504db5751aabbba20f2d130 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 20:22:24 -0300 Subject: [PATCH 02/10] chore: debug --- test/fixtures/all/filtered/lib/excluded.js | 3 + test/fixtures/all/filtered/main.js | 6 ++ test/fixtures/all/filtered/src/loaded.js | 15 +++++ test/fixtures/all/filtered/src/unloaded.js | 3 + test/normalize-process-cov.js | 67 ++++++++++++++++++++++ 5 files changed, 94 insertions(+) create mode 100644 test/fixtures/all/filtered/lib/excluded.js create mode 100644 test/fixtures/all/filtered/main.js create mode 100644 test/fixtures/all/filtered/src/loaded.js create mode 100644 test/fixtures/all/filtered/src/unloaded.js create mode 100644 test/normalize-process-cov.js diff --git a/test/fixtures/all/filtered/lib/excluded.js b/test/fixtures/all/filtered/lib/excluded.js new file mode 100644 index 00000000..460f0ed8 --- /dev/null +++ b/test/fixtures/all/filtered/lib/excluded.js @@ -0,0 +1,3 @@ +module.exports = function excluded () { + return 'I am excluded from coverage' +} diff --git a/test/fixtures/all/filtered/main.js b/test/fixtures/all/filtered/main.js new file mode 100644 index 00000000..bb34cba7 --- /dev/null +++ b/test/fixtures/all/filtered/main.js @@ -0,0 +1,6 @@ +const loaded = require('./src/loaded.js') +const excluded = require('./lib/excluded.js') +console.log(loaded(0)) +console.log(loaded(1)) +console.log(loaded(-1)) +console.log(excluded()) diff --git a/test/fixtures/all/filtered/src/loaded.js b/test/fixtures/all/filtered/src/loaded.js new file mode 100644 index 00000000..7e70686a --- /dev/null +++ b/test/fixtures/all/filtered/src/loaded.js @@ -0,0 +1,15 @@ +module.exports = function getString (i) { + if (typeof i === 'number') { + if (isNaN(i)) { + return 'NaN' + } else if (i === 0) { + return 'zero' + } else if (i > 0) { + return 'positive' + } else { + return 'negative' + } + } else { + return 'wat?' + } +} diff --git a/test/fixtures/all/filtered/src/unloaded.js b/test/fixtures/all/filtered/src/unloaded.js new file mode 100644 index 00000000..6e9ed1ef --- /dev/null +++ b/test/fixtures/all/filtered/src/unloaded.js @@ -0,0 +1,3 @@ +module.exports = function Unloaded () { + return 'Never loaded :(' +} diff --git a/test/normalize-process-cov.js b/test/normalize-process-cov.js new file mode 100644 index 00000000..44c47642 --- /dev/null +++ b/test/normalize-process-cov.js @@ -0,0 +1,67 @@ +/* global describe, it */ + +const { pathToFileURL } = require('url') +const { resolve } = require('path') +const createReport = require('../lib/report') + +require('chai').should() + +describe('_normalizeProcessCov', () => { + it('should not add files that fail shouldInstrument to fileIndex', () => { + const report = createReport({ + include: ['test/fixtures/all/filtered/src/**/*.js'], + exclude: [], + tempDirectory: 'tmp/filtered', + reportsDirectory: 'coverage/filtered', + reporter: ['text'] + }) + + const includedFile = resolve('test/fixtures/all/filtered/src/loaded.js') + const excludedFile = resolve('test/fixtures/all/filtered/lib/excluded.js') + const entryFile = resolve('test/fixtures/all/filtered/main.js') + + const fakeV8ProcessCov = { + result: [ + { + scriptId: '1', + url: pathToFileURL(includedFile).href, + functions: [{ + functionName: '', + ranges: [{ startOffset: 0, endOffset: 100, count: 1 }], + isBlockCoverage: true + }] + }, + { + scriptId: '2', + url: pathToFileURL(excludedFile).href, + functions: [{ + functionName: '', + ranges: [{ startOffset: 0, endOffset: 50, count: 1 }], + isBlockCoverage: true + }] + }, + { + scriptId: '3', + url: pathToFileURL(entryFile).href, + functions: [{ + functionName: '', + ranges: [{ startOffset: 0, endOffset: 80, count: 1 }], + isBlockCoverage: true + }] + } + ] + } + + const fileIndex = new Set() + const normalized = report._normalizeProcessCov(fakeV8ProcessCov, fileIndex) + + // Only the file matching the include pattern should be in the result + normalized.result.should.have.lengthOf(1) + normalized.result[0].url.should.equal(includedFile) + + // fileIndex should only contain files that passed shouldInstrument + fileIndex.has(includedFile).should.equal(true) + fileIndex.has(excludedFile).should.equal(false) + fileIndex.has(entryFile).should.equal(false) + }) +}) From f7f97641ca441c30a31866e2fdb1ac3780847b3a Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 20:32:28 -0300 Subject: [PATCH 03/10] ci: update snapshot --- test/integration.js.snap | 130 ++++++++++++++++++++++----------------- 1 file changed, 72 insertions(+), 58 deletions(-) diff --git a/test/integration.js.snap b/test/integration.js.snap index fdbce704..f290d7be 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -156,35 +156,42 @@ hey ---------------------------------------|---------|----------|---------|---------|------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------------------------|---------|----------|---------|---------|------------------------ -All files | 3.21 | 12.24 | 6.38 | 3.21 | - c8 | 0 | 0 | 0 | 0 | - index.js | 0 | 0 | 0 | 0 | 1 - c8/bin | 0 | 0 | 0 | 0 | - c8.js | 0 | 0 | 0 | 0 | 1-43 - c8/coverage | 0 | 0 | 0 | 0 | - block-navigation.js | 0 | 0 | 0 | 0 | 1-87 - prettify.js | 0 | 0 | 0 | 0 | 1-2 - sorter.js | 0 | 0 | 0 | 0 | 1-196 - c8/lib | 0 | 0 | 0 | 0 | - parse-args.js | 0 | 0 | 0 | 0 | 1-229 - report.js | 0 | 0 | 0 | 0 | 1-542 - source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 - c8/lib/commands | 0 | 0 | 0 | 0 | - check-coverage.js | 0 | 0 | 0 | 0 | 1-70 - report.js | 0 | 0 | 0 | 0 | 1-44 - c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | - async.js | 100 | 100 | 100 | 100 | - c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 - c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 - computed-method.js | 0 | 0 | 0 | 0 | 1-15 - custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 - custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 - import-mcr.js | 0 | 0 | 0 | 0 | 1-12 - issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 - multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 - normal.js | 0 | 0 | 0 | 0 | 1-24 - shebang.js | 0 | 0 | 0 | 0 | 1-8 - subprocess.js | 0 | 0 | 0 | 0 | 1-15 +All files | 3.16 | 11.32 | 5.88 | 3.16 | + c8 | 0 | 0 | 0 | 0 | + index.js | 0 | 0 | 0 | 0 | 1 + c8/bin | 0 | 0 | 0 | 0 | + c8.js | 0 | 0 | 0 | 0 | 1-43 + c8/coverage | 0 | 0 | 0 | 0 | + block-navigation.js | 0 | 0 | 0 | 0 | 1-87 + prettify.js | 0 | 0 | 0 | 0 | 1-2 + sorter.js | 0 | 0 | 0 | 0 | 1-196 + c8/lib | 0 | 0 | 0 | 0 | + parse-args.js | 0 | 0 | 0 | 0 | 1-229 + report.js | 0 | 0 | 0 | 0 | 1-542 + source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 + c8/lib/commands | 0 | 0 | 0 | 0 | + check-coverage.js | 0 | 0 | 0 | 0 | 1-70 + report.js | 0 | 0 | 0 | 0 | 1-44 + c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | + async.js | 100 | 100 | 100 | 100 | + c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 + c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 + computed-method.js | 0 | 0 | 0 | 0 | 1-15 + custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 + custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 + import-mcr.js | 0 | 0 | 0 | 0 | 1-12 + issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 + multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 + normal.js | 0 | 0 | 0 | 0 | 1-24 + shebang.js | 0 | 0 | 0 | 0 | 1-8 + subprocess.js | 0 | 0 | 0 | 0 | 1-15 + c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | + main.js | 0 | 0 | 0 | 0 | 1-6 + c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | + excluded.js | 0 | 0 | 0 | 0 | 1-3 + c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | + loaded.js | 0 | 0 | 0 | 0 | 1-15 + unloaded.js | 0 | 0 | 0 | 0 | 1-3 c8/test/fixtures/all/ts-compiled | 0 | 0 | 0 | 0 | loaded.ts | 0 | 0 | 0 | 0 | 1-19 main.ts | 0 | 0 | 0 | 0 | 1-4 @@ -522,35 +529,42 @@ hey ---------------------------------------|---------|----------|---------|---------|------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------------------------|---------|----------|---------|---------|------------------------ -All files | 3.21 | 12.24 | 6.38 | 3.21 | - c8 | 0 | 0 | 0 | 0 | - index.js | 0 | 0 | 0 | 0 | 1 - c8/bin | 0 | 0 | 0 | 0 | - c8.js | 0 | 0 | 0 | 0 | 1-43 - c8/coverage | 0 | 0 | 0 | 0 | - block-navigation.js | 0 | 0 | 0 | 0 | 1-87 - prettify.js | 0 | 0 | 0 | 0 | 1-2 - sorter.js | 0 | 0 | 0 | 0 | 1-196 - c8/lib | 0 | 0 | 0 | 0 | - parse-args.js | 0 | 0 | 0 | 0 | 1-229 - report.js | 0 | 0 | 0 | 0 | 1-542 - source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 - c8/lib/commands | 0 | 0 | 0 | 0 | - check-coverage.js | 0 | 0 | 0 | 0 | 1-70 - report.js | 0 | 0 | 0 | 0 | 1-44 - c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | - async.js | 100 | 100 | 100 | 100 | - c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 - c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 - computed-method.js | 0 | 0 | 0 | 0 | 1-15 - custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 - custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 - import-mcr.js | 0 | 0 | 0 | 0 | 1-12 - issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 - multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 - normal.js | 0 | 0 | 0 | 0 | 1-24 - shebang.js | 0 | 0 | 0 | 0 | 1-8 - subprocess.js | 0 | 0 | 0 | 0 | 1-15 +All files | 3.16 | 11.32 | 5.88 | 3.16 | + c8 | 0 | 0 | 0 | 0 | + index.js | 0 | 0 | 0 | 0 | 1 + c8/bin | 0 | 0 | 0 | 0 | + c8.js | 0 | 0 | 0 | 0 | 1-43 + c8/coverage | 0 | 0 | 0 | 0 | + block-navigation.js | 0 | 0 | 0 | 0 | 1-87 + prettify.js | 0 | 0 | 0 | 0 | 1-2 + sorter.js | 0 | 0 | 0 | 0 | 1-196 + c8/lib | 0 | 0 | 0 | 0 | + parse-args.js | 0 | 0 | 0 | 0 | 1-229 + report.js | 0 | 0 | 0 | 0 | 1-542 + source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 + c8/lib/commands | 0 | 0 | 0 | 0 | + check-coverage.js | 0 | 0 | 0 | 0 | 1-70 + report.js | 0 | 0 | 0 | 0 | 1-44 + c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | + async.js | 100 | 100 | 100 | 100 | + c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 + c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 + computed-method.js | 0 | 0 | 0 | 0 | 1-15 + custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 + custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 + import-mcr.js | 0 | 0 | 0 | 0 | 1-12 + issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 + multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 + normal.js | 0 | 0 | 0 | 0 | 1-24 + shebang.js | 0 | 0 | 0 | 0 | 1-8 + subprocess.js | 0 | 0 | 0 | 0 | 1-15 + c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | + main.js | 0 | 0 | 0 | 0 | 1-6 + c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | + excluded.js | 0 | 0 | 0 | 0 | 1-3 + c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | + loaded.js | 0 | 0 | 0 | 0 | 1-15 + unloaded.js | 0 | 0 | 0 | 0 | 1-3 c8/test/fixtures/all/ts-compiled | 0 | 0 | 0 | 0 | loaded.ts | 0 | 0 | 0 | 0 | 1-19 main.ts | 0 | 0 | 0 | 0 | 1-4 From 65bd19a582e94c1b28984c212cd325b02cf52032 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 20:37:39 -0300 Subject: [PATCH 04/10] ci: ensure snap spaces --- test/integration.js.snap | 144 +++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/test/integration.js.snap b/test/integration.js.snap index f290d7be..36703c56 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -156,42 +156,42 @@ hey ---------------------------------------|---------|----------|---------|---------|------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------------------------|---------|----------|---------|---------|------------------------ -All files | 3.16 | 11.32 | 5.88 | 3.16 | - c8 | 0 | 0 | 0 | 0 | - index.js | 0 | 0 | 0 | 0 | 1 - c8/bin | 0 | 0 | 0 | 0 | - c8.js | 0 | 0 | 0 | 0 | 1-43 - c8/coverage | 0 | 0 | 0 | 0 | - block-navigation.js | 0 | 0 | 0 | 0 | 1-87 - prettify.js | 0 | 0 | 0 | 0 | 1-2 - sorter.js | 0 | 0 | 0 | 0 | 1-196 - c8/lib | 0 | 0 | 0 | 0 | - parse-args.js | 0 | 0 | 0 | 0 | 1-229 - report.js | 0 | 0 | 0 | 0 | 1-542 - source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 - c8/lib/commands | 0 | 0 | 0 | 0 | - check-coverage.js | 0 | 0 | 0 | 0 | 1-70 - report.js | 0 | 0 | 0 | 0 | 1-44 - c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | - async.js | 100 | 100 | 100 | 100 | - c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 - c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 - computed-method.js | 0 | 0 | 0 | 0 | 1-15 - custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 - custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 - import-mcr.js | 0 | 0 | 0 | 0 | 1-12 - issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 - multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 - normal.js | 0 | 0 | 0 | 0 | 1-24 - shebang.js | 0 | 0 | 0 | 0 | 1-8 - subprocess.js | 0 | 0 | 0 | 0 | 1-15 - c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | - main.js | 0 | 0 | 0 | 0 | 1-6 - c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | - excluded.js | 0 | 0 | 0 | 0 | 1-3 - c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | - loaded.js | 0 | 0 | 0 | 0 | 1-15 - unloaded.js | 0 | 0 | 0 | 0 | 1-3 +All files | 3.16 | 11.32 | 5.88 | 3.16 | + c8 | 0 | 0 | 0 | 0 | + index.js | 0 | 0 | 0 | 0 | 1 + c8/bin | 0 | 0 | 0 | 0 | + c8.js | 0 | 0 | 0 | 0 | 1-43 + c8/coverage | 0 | 0 | 0 | 0 | + block-navigation.js | 0 | 0 | 0 | 0 | 1-87 + prettify.js | 0 | 0 | 0 | 0 | 1-2 + sorter.js | 0 | 0 | 0 | 0 | 1-196 + c8/lib | 0 | 0 | 0 | 0 | + parse-args.js | 0 | 0 | 0 | 0 | 1-229 + report.js | 0 | 0 | 0 | 0 | 1-542 + source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 + c8/lib/commands | 0 | 0 | 0 | 0 | + check-coverage.js | 0 | 0 | 0 | 0 | 1-70 + report.js | 0 | 0 | 0 | 0 | 1-44 + c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | + async.js | 100 | 100 | 100 | 100 | + c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 + c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 + computed-method.js | 0 | 0 | 0 | 0 | 1-15 + custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 + custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 + import-mcr.js | 0 | 0 | 0 | 0 | 1-12 + issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 + multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 + normal.js | 0 | 0 | 0 | 0 | 1-24 + shebang.js | 0 | 0 | 0 | 0 | 1-8 + subprocess.js | 0 | 0 | 0 | 0 | 1-15 + c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | + main.js | 0 | 0 | 0 | 0 | 1-6 + c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | + excluded.js | 0 | 0 | 0 | 0 | 1-3 + c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | + loaded.js | 0 | 0 | 0 | 0 | 1-15 + unloaded.js | 0 | 0 | 0 | 0 | 1-3 c8/test/fixtures/all/ts-compiled | 0 | 0 | 0 | 0 | loaded.ts | 0 | 0 | 0 | 0 | 1-19 main.ts | 0 | 0 | 0 | 0 | 1-4 @@ -529,42 +529,42 @@ hey ---------------------------------------|---------|----------|---------|---------|------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------------------------|---------|----------|---------|---------|------------------------ -All files | 3.16 | 11.32 | 5.88 | 3.16 | - c8 | 0 | 0 | 0 | 0 | - index.js | 0 | 0 | 0 | 0 | 1 - c8/bin | 0 | 0 | 0 | 0 | - c8.js | 0 | 0 | 0 | 0 | 1-43 - c8/coverage | 0 | 0 | 0 | 0 | - block-navigation.js | 0 | 0 | 0 | 0 | 1-87 - prettify.js | 0 | 0 | 0 | 0 | 1-2 - sorter.js | 0 | 0 | 0 | 0 | 1-196 - c8/lib | 0 | 0 | 0 | 0 | - parse-args.js | 0 | 0 | 0 | 0 | 1-229 - report.js | 0 | 0 | 0 | 0 | 1-542 - source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 - c8/lib/commands | 0 | 0 | 0 | 0 | - check-coverage.js | 0 | 0 | 0 | 0 | 1-70 - report.js | 0 | 0 | 0 | 0 | 1-44 - c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | - async.js | 100 | 100 | 100 | 100 | - c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 - c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 - computed-method.js | 0 | 0 | 0 | 0 | 1-15 - custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 - custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 - import-mcr.js | 0 | 0 | 0 | 0 | 1-12 - issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 - multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 - normal.js | 0 | 0 | 0 | 0 | 1-24 - shebang.js | 0 | 0 | 0 | 0 | 1-8 - subprocess.js | 0 | 0 | 0 | 0 | 1-15 - c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | - main.js | 0 | 0 | 0 | 0 | 1-6 - c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | - excluded.js | 0 | 0 | 0 | 0 | 1-3 - c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | - loaded.js | 0 | 0 | 0 | 0 | 1-15 - unloaded.js | 0 | 0 | 0 | 0 | 1-3 +All files | 3.16 | 11.32 | 5.88 | 3.16 | + c8 | 0 | 0 | 0 | 0 | + index.js | 0 | 0 | 0 | 0 | 1 + c8/bin | 0 | 0 | 0 | 0 | + c8.js | 0 | 0 | 0 | 0 | 1-43 + c8/coverage | 0 | 0 | 0 | 0 | + block-navigation.js | 0 | 0 | 0 | 0 | 1-87 + prettify.js | 0 | 0 | 0 | 0 | 1-2 + sorter.js | 0 | 0 | 0 | 0 | 1-196 + c8/lib | 0 | 0 | 0 | 0 | + parse-args.js | 0 | 0 | 0 | 0 | 1-229 + report.js | 0 | 0 | 0 | 0 | 1-542 + source-map-from-file.js | 0 | 0 | 0 | 0 | 1-100 + c8/lib/commands | 0 | 0 | 0 | 0 | + check-coverage.js | 0 | 0 | 0 | 0 | 1-70 + report.js | 0 | 0 | 0 | 0 | 1-44 + c8/test/fixtures | 29.08 | 35.29 | 20 | 29.08 | + async.js | 100 | 100 | 100 | 100 | + c8-ignore-next.js | 54.54 | 0 | 0 | 54.54 | 1,3-4,9,12,17-19,21-22 + c8-ignore-start-stop.js | 61.9 | 0 | 0 | 61.9 | 1-4,10,16-18 + computed-method.js | 0 | 0 | 0 | 0 | 1-15 + custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 + custom-ext2.special | 0 | 0 | 0 | 0 | 1-24 + import-mcr.js | 0 | 0 | 0 | 0 | 1-12 + issue-254.js | 28.57 | 0 | 0 | 28.57 | 1-2,5-7 + multiple-spawn.js | 0 | 0 | 0 | 0 | 1-12 + normal.js | 0 | 0 | 0 | 0 | 1-24 + shebang.js | 0 | 0 | 0 | 0 | 1-8 + subprocess.js | 0 | 0 | 0 | 0 | 1-15 + c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | + main.js | 0 | 0 | 0 | 0 | 1-6 + c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | + excluded.js | 0 | 0 | 0 | 0 | 1-3 + c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | + loaded.js | 0 | 0 | 0 | 0 | 1-15 + unloaded.js | 0 | 0 | 0 | 0 | 1-3 c8/test/fixtures/all/ts-compiled | 0 | 0 | 0 | 0 | loaded.ts | 0 | 0 | 0 | 0 | 1-19 main.ts | 0 | 0 | 0 | 0 | 1-4 From 8efd2965035de7ac532829e08c8acf4758258807 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 20:54:11 -0300 Subject: [PATCH 05/10] ci: simplify tests --- test/integration.js | 20 +++++++++++ test/normalize-process-cov.js | 67 ----------------------------------- 2 files changed, 20 insertions(+), 67 deletions(-) delete mode 100644 test/normalize-process-cov.js diff --git a/test/integration.js b/test/integration.js index 8e00be0b..c05c9679 100644 --- a/test/integration.js +++ b/test/integration.js @@ -515,6 +515,26 @@ beforeEach(function () { output.toString('utf8').should.matchSnapshot() }) + it('should not let files that fail shouldInstrument pollute fileIndex', () => { + const { output } = spawnSync(nodePath, [ + c8Path, + '--temp-directory=tmp/filtered-all', + '--clean=false', + '--all=true', + '--include=test/fixtures/all/filtered/src/**/*.js', + '--exclude=**/*.ts', + `--merge-async=${mergeAsync}`, + nodePath, + require.resolve('./fixtures/all/filtered/main') + ]) + const report = output.toString('utf8') + // unloaded.js should appear as 0% + report.should.match(/unloaded\.js/) + // excluded files should not appear + report.should.not.match(/excluded\.js/) + report.should.not.match(/main\.js/) + }) + it('reports coverage for unloaded transpiled ts files as 0 for line, branch and function', () => { const { output } = spawnSync(nodePath, [ c8Path, diff --git a/test/normalize-process-cov.js b/test/normalize-process-cov.js deleted file mode 100644 index 44c47642..00000000 --- a/test/normalize-process-cov.js +++ /dev/null @@ -1,67 +0,0 @@ -/* global describe, it */ - -const { pathToFileURL } = require('url') -const { resolve } = require('path') -const createReport = require('../lib/report') - -require('chai').should() - -describe('_normalizeProcessCov', () => { - it('should not add files that fail shouldInstrument to fileIndex', () => { - const report = createReport({ - include: ['test/fixtures/all/filtered/src/**/*.js'], - exclude: [], - tempDirectory: 'tmp/filtered', - reportsDirectory: 'coverage/filtered', - reporter: ['text'] - }) - - const includedFile = resolve('test/fixtures/all/filtered/src/loaded.js') - const excludedFile = resolve('test/fixtures/all/filtered/lib/excluded.js') - const entryFile = resolve('test/fixtures/all/filtered/main.js') - - const fakeV8ProcessCov = { - result: [ - { - scriptId: '1', - url: pathToFileURL(includedFile).href, - functions: [{ - functionName: '', - ranges: [{ startOffset: 0, endOffset: 100, count: 1 }], - isBlockCoverage: true - }] - }, - { - scriptId: '2', - url: pathToFileURL(excludedFile).href, - functions: [{ - functionName: '', - ranges: [{ startOffset: 0, endOffset: 50, count: 1 }], - isBlockCoverage: true - }] - }, - { - scriptId: '3', - url: pathToFileURL(entryFile).href, - functions: [{ - functionName: '', - ranges: [{ startOffset: 0, endOffset: 80, count: 1 }], - isBlockCoverage: true - }] - } - ] - } - - const fileIndex = new Set() - const normalized = report._normalizeProcessCov(fakeV8ProcessCov, fileIndex) - - // Only the file matching the include pattern should be in the result - normalized.result.should.have.lengthOf(1) - normalized.result[0].url.should.equal(includedFile) - - // fileIndex should only contain files that passed shouldInstrument - fileIndex.has(includedFile).should.equal(true) - fileIndex.has(excludedFile).should.equal(false) - fileIndex.has(entryFile).should.equal(false) - }) -}) From 1a458c625444b6735a9c8e966fd2b4b90e1b8f37 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:23:55 -0300 Subject: [PATCH 06/10] ci: debug --- test/integration.js | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/test/integration.js b/test/integration.js index c05c9679..4e1c7ebc 100644 --- a/test/integration.js +++ b/test/integration.js @@ -5,6 +5,8 @@ const { resolve } = require('path') const { spawnSync } = require('child_process') const { statSync, rm } = require('fs') const { dirname } = require('path') +const { pathToFileURL } = require('url') +const createReport = require('../lib/report') const c8Path = require.resolve('../bin/c8') const nodePath = process.execPath const tsNodePath = './node_modules/.bin/ts-node' @@ -515,7 +517,7 @@ beforeEach(function () { output.toString('utf8').should.matchSnapshot() }) - it('should not let files that fail shouldInstrument pollute fileIndex', () => { + it('reports uncovered files that match include pattern as 0 for line, branch and function', () => { const { output } = spawnSync(nodePath, [ c8Path, '--temp-directory=tmp/filtered-all', @@ -528,13 +530,38 @@ beforeEach(function () { require.resolve('./fixtures/all/filtered/main') ]) const report = output.toString('utf8') - // unloaded.js should appear as 0% report.should.match(/unloaded\.js/) - // excluded files should not appear report.should.not.match(/excluded\.js/) report.should.not.match(/main\.js/) }) + it('should only track files that pass shouldInstrument in fileIndex', () => { + const report = createReport({ + include: ['test/fixtures/all/filtered/src/**/*.js'], + exclude: [], + tempDirectory: 'tmp/filtered-fileindex', + reportsDirectory: 'coverage/filtered-fileindex', + reporter: ['text'] + }) + + const includedFile = resolve('test/fixtures/all/filtered/src/loaded.js') + const excludedFile = resolve('test/fixtures/all/filtered/lib/excluded.js') + const entryFile = resolve('test/fixtures/all/filtered/main.js') + + const fileIndex = new Set() + report._normalizeProcessCov({ + result: [ + { scriptId: '1', url: pathToFileURL(includedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 100, count: 1 }], isBlockCoverage: true }] }, + { scriptId: '2', url: pathToFileURL(excludedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 50, count: 1 }], isBlockCoverage: true }] }, + { scriptId: '3', url: pathToFileURL(entryFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 80, count: 1 }], isBlockCoverage: true }] } + ] + }, fileIndex) + + fileIndex.has(includedFile).should.equal(true) + fileIndex.has(excludedFile).should.equal(false) + fileIndex.has(entryFile).should.equal(false) + }) + it('reports coverage for unloaded transpiled ts files as 0 for line, branch and function', () => { const { output } = spawnSync(nodePath, [ c8Path, From d1ea049b47766763fe3011ee3093ddc3121c4a4c Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:27:52 -0300 Subject: [PATCH 07/10] ci: remove unused tests --- test/integration.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/test/integration.js b/test/integration.js index 4e1c7ebc..fbb140de 100644 --- a/test/integration.js +++ b/test/integration.js @@ -517,24 +517,6 @@ beforeEach(function () { output.toString('utf8').should.matchSnapshot() }) - it('reports uncovered files that match include pattern as 0 for line, branch and function', () => { - const { output } = spawnSync(nodePath, [ - c8Path, - '--temp-directory=tmp/filtered-all', - '--clean=false', - '--all=true', - '--include=test/fixtures/all/filtered/src/**/*.js', - '--exclude=**/*.ts', - `--merge-async=${mergeAsync}`, - nodePath, - require.resolve('./fixtures/all/filtered/main') - ]) - const report = output.toString('utf8') - report.should.match(/unloaded\.js/) - report.should.not.match(/excluded\.js/) - report.should.not.match(/main\.js/) - }) - it('should only track files that pass shouldInstrument in fileIndex', () => { const report = createReport({ include: ['test/fixtures/all/filtered/src/**/*.js'], From 54d122456893fbaf9052f529b8ba41947d28e3ec Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:36:28 -0300 Subject: [PATCH 08/10] ci: remove unused tests --- test/fixtures/all/filtered/lib/excluded.js | 3 --- test/fixtures/all/filtered/main.js | 6 ------ test/fixtures/all/filtered/src/loaded.js | 15 --------------- test/fixtures/all/filtered/src/unloaded.js | 3 --- test/integration.js | 8 ++++---- test/integration.js.snap | 18 ++---------------- 6 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 test/fixtures/all/filtered/lib/excluded.js delete mode 100644 test/fixtures/all/filtered/main.js delete mode 100644 test/fixtures/all/filtered/src/loaded.js delete mode 100644 test/fixtures/all/filtered/src/unloaded.js diff --git a/test/fixtures/all/filtered/lib/excluded.js b/test/fixtures/all/filtered/lib/excluded.js deleted file mode 100644 index 460f0ed8..00000000 --- a/test/fixtures/all/filtered/lib/excluded.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function excluded () { - return 'I am excluded from coverage' -} diff --git a/test/fixtures/all/filtered/main.js b/test/fixtures/all/filtered/main.js deleted file mode 100644 index bb34cba7..00000000 --- a/test/fixtures/all/filtered/main.js +++ /dev/null @@ -1,6 +0,0 @@ -const loaded = require('./src/loaded.js') -const excluded = require('./lib/excluded.js') -console.log(loaded(0)) -console.log(loaded(1)) -console.log(loaded(-1)) -console.log(excluded()) diff --git a/test/fixtures/all/filtered/src/loaded.js b/test/fixtures/all/filtered/src/loaded.js deleted file mode 100644 index 7e70686a..00000000 --- a/test/fixtures/all/filtered/src/loaded.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = function getString (i) { - if (typeof i === 'number') { - if (isNaN(i)) { - return 'NaN' - } else if (i === 0) { - return 'zero' - } else if (i > 0) { - return 'positive' - } else { - return 'negative' - } - } else { - return 'wat?' - } -} diff --git a/test/fixtures/all/filtered/src/unloaded.js b/test/fixtures/all/filtered/src/unloaded.js deleted file mode 100644 index 6e9ed1ef..00000000 --- a/test/fixtures/all/filtered/src/unloaded.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function Unloaded () { - return 'Never loaded :(' -} diff --git a/test/integration.js b/test/integration.js index fbb140de..97b605b4 100644 --- a/test/integration.js +++ b/test/integration.js @@ -519,16 +519,16 @@ beforeEach(function () { it('should only track files that pass shouldInstrument in fileIndex', () => { const report = createReport({ - include: ['test/fixtures/all/filtered/src/**/*.js'], + include: ['fake/src/**/*.js'], exclude: [], tempDirectory: 'tmp/filtered-fileindex', reportsDirectory: 'coverage/filtered-fileindex', reporter: ['text'] }) - const includedFile = resolve('test/fixtures/all/filtered/src/loaded.js') - const excludedFile = resolve('test/fixtures/all/filtered/lib/excluded.js') - const entryFile = resolve('test/fixtures/all/filtered/main.js') + const includedFile = resolve('fake/src/should-be-in-fileindex.js') + const excludedFile = resolve('fake/lib/should-not-be-in-fileindex.js') + const entryFile = resolve('fake/should-not-be-in-fileindex.js') const fileIndex = new Set() report._normalizeProcessCov({ diff --git a/test/integration.js.snap b/test/integration.js.snap index 36703c56..fdbce704 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -156,7 +156,7 @@ hey ---------------------------------------|---------|----------|---------|---------|------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------------------------|---------|----------|---------|---------|------------------------ -All files | 3.16 | 11.32 | 5.88 | 3.16 | +All files | 3.21 | 12.24 | 6.38 | 3.21 | c8 | 0 | 0 | 0 | 0 | index.js | 0 | 0 | 0 | 0 | 1 c8/bin | 0 | 0 | 0 | 0 | @@ -185,13 +185,6 @@ All files | 3.16 | 11.32 | 5.88 | 3.16 normal.js | 0 | 0 | 0 | 0 | 1-24 shebang.js | 0 | 0 | 0 | 0 | 1-8 subprocess.js | 0 | 0 | 0 | 0 | 1-15 - c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | - main.js | 0 | 0 | 0 | 0 | 1-6 - c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | - excluded.js | 0 | 0 | 0 | 0 | 1-3 - c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | - loaded.js | 0 | 0 | 0 | 0 | 1-15 - unloaded.js | 0 | 0 | 0 | 0 | 1-3 c8/test/fixtures/all/ts-compiled | 0 | 0 | 0 | 0 | loaded.ts | 0 | 0 | 0 | 0 | 1-19 main.ts | 0 | 0 | 0 | 0 | 1-4 @@ -529,7 +522,7 @@ hey ---------------------------------------|---------|----------|---------|---------|------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------------------------|---------|----------|---------|---------|------------------------ -All files | 3.16 | 11.32 | 5.88 | 3.16 | +All files | 3.21 | 12.24 | 6.38 | 3.21 | c8 | 0 | 0 | 0 | 0 | index.js | 0 | 0 | 0 | 0 | 1 c8/bin | 0 | 0 | 0 | 0 | @@ -558,13 +551,6 @@ All files | 3.16 | 11.32 | 5.88 | 3.16 normal.js | 0 | 0 | 0 | 0 | 1-24 shebang.js | 0 | 0 | 0 | 0 | 1-8 subprocess.js | 0 | 0 | 0 | 0 | 1-15 - c8/test/fixtures/all/filtered | 0 | 0 | 0 | 0 | - main.js | 0 | 0 | 0 | 0 | 1-6 - c8/test/fixtures/all/filtered/lib | 0 | 0 | 0 | 0 | - excluded.js | 0 | 0 | 0 | 0 | 1-3 - c8/test/fixtures/all/filtered/src | 0 | 0 | 0 | 0 | - loaded.js | 0 | 0 | 0 | 0 | 1-15 - unloaded.js | 0 | 0 | 0 | 0 | 1-3 c8/test/fixtures/all/ts-compiled | 0 | 0 | 0 | 0 | loaded.ts | 0 | 0 | 0 | 0 | 1-19 main.ts | 0 | 0 | 0 | 0 | 1-4 From cbd07000c05c1da822a2717601c403d72ac670bb Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:37:55 -0300 Subject: [PATCH 09/10] ci: adjust test order --- test/integration.js | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/test/integration.js b/test/integration.js index 97b605b4..a5a5c571 100644 --- a/test/integration.js +++ b/test/integration.js @@ -517,33 +517,6 @@ beforeEach(function () { output.toString('utf8').should.matchSnapshot() }) - it('should only track files that pass shouldInstrument in fileIndex', () => { - const report = createReport({ - include: ['fake/src/**/*.js'], - exclude: [], - tempDirectory: 'tmp/filtered-fileindex', - reportsDirectory: 'coverage/filtered-fileindex', - reporter: ['text'] - }) - - const includedFile = resolve('fake/src/should-be-in-fileindex.js') - const excludedFile = resolve('fake/lib/should-not-be-in-fileindex.js') - const entryFile = resolve('fake/should-not-be-in-fileindex.js') - - const fileIndex = new Set() - report._normalizeProcessCov({ - result: [ - { scriptId: '1', url: pathToFileURL(includedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 100, count: 1 }], isBlockCoverage: true }] }, - { scriptId: '2', url: pathToFileURL(excludedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 50, count: 1 }], isBlockCoverage: true }] }, - { scriptId: '3', url: pathToFileURL(entryFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 80, count: 1 }], isBlockCoverage: true }] } - ] - }, fileIndex) - - fileIndex.has(includedFile).should.equal(true) - fileIndex.has(excludedFile).should.equal(false) - fileIndex.has(entryFile).should.equal(false) - }) - it('reports coverage for unloaded transpiled ts files as 0 for line, branch and function', () => { const { output } = spawnSync(nodePath, [ c8Path, @@ -621,6 +594,33 @@ beforeEach(function () { ]) output.toString('utf8').should.matchSnapshot() }) + + it('should only track files that pass shouldInstrument in fileIndex', () => { + const report = createReport({ + include: ['fake/src/**/*.js'], + exclude: [], + tempDirectory: 'tmp/filtered-fileindex', + reportsDirectory: 'coverage/filtered-fileindex', + reporter: ['text'] + }) + + const includedFile = resolve('fake/src/should-be-in-fileindex.js') + const excludedFile = resolve('fake/lib/should-not-be-in-fileindex.js') + const entryFile = resolve('fake/should-not-be-in-fileindex.js') + + const fileIndex = new Set() + report._normalizeProcessCov({ + result: [ + { scriptId: '1', url: pathToFileURL(includedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 100, count: 1 }], isBlockCoverage: true }] }, + { scriptId: '2', url: pathToFileURL(excludedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 50, count: 1 }], isBlockCoverage: true }] }, + { scriptId: '3', url: pathToFileURL(entryFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 80, count: 1 }], isBlockCoverage: true }] } + ] + }, fileIndex) + + fileIndex.has(includedFile).should.equal(true) + fileIndex.has(excludedFile).should.equal(false) + fileIndex.has(entryFile).should.equal(false) + }) }) // see: https://github.com/bcoe/c8/issues/149 it('cobertura report escapes special characters', () => { From aa71704979dee8a47475f020950f8e82192b72ee Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Tue, 31 Mar 2026 22:21:55 -0300 Subject: [PATCH 10/10] ci: improve logic --- test/integration.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/integration.js b/test/integration.js index a5a5c571..07112731 100644 --- a/test/integration.js +++ b/test/integration.js @@ -609,11 +609,21 @@ beforeEach(function () { const entryFile = resolve('fake/should-not-be-in-fileindex.js') const fileIndex = new Set() + const fakeCovEntry = (scriptId, filepath) => ({ + scriptId, + url: pathToFileURL(filepath).href, + functions: [{ + functionName: '', + ranges: [{ startOffset: 0, endOffset: 100, count: 1 }], + isBlockCoverage: true + }] + }) + report._normalizeProcessCov({ result: [ - { scriptId: '1', url: pathToFileURL(includedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 100, count: 1 }], isBlockCoverage: true }] }, - { scriptId: '2', url: pathToFileURL(excludedFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 50, count: 1 }], isBlockCoverage: true }] }, - { scriptId: '3', url: pathToFileURL(entryFile).href, functions: [{ functionName: '', ranges: [{ startOffset: 0, endOffset: 80, count: 1 }], isBlockCoverage: true }] } + fakeCovEntry('1', includedFile), + fakeCovEntry('2', excludedFile), + fakeCovEntry('3', entryFile) ] }, fileIndex)