diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 4001bd40..f56e2360 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- node: [10, 12, 14, 16, 18]
+ node: [12, 14, 16, 18]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
@@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
- node-version: 16
+ node-version: lts/*
cache: npm
- run: npm ci
- run: npm test
@@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
- node-version: 16
+ node-version: lts/*
cache: npm
- run: npm ci
- run: npm run coverage
diff --git a/README.md b/README.md
index 44713958..a266a1da 100644
--- a/README.md
+++ b/README.md
@@ -167,7 +167,7 @@ const os = process.platform === 'darwin' ? 'OSXy' /* c8 ignore next */ : 'Window
## Supported Node.js Versions
c8 uses [native V8 coverage](https://github.com/nodejs/node/pull/22527),
-make sure you're running Node.js `>= 10.12.0`.
+make sure you're running Node.js `>= 12`.
## Contributing to `c8`
diff --git a/package.json b/package.json
index 134ddf72..8136b54a 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
"typescript": "^4.6.2"
},
"engines": {
- "node": ">=10.12.0"
+ "node": ">=12"
},
"files": [
"index.js",
diff --git a/test/integration.js b/test/integration.js
index 76a244c8..48c940ea 100644
--- a/test/integration.js
+++ b/test/integration.js
@@ -17,14 +17,7 @@ require('chai')
before(cb => rimraf('tmp', cb))
-const nodeMajorVersion = Number(process.version.slice(1).split('.')[0])
beforeEach(function () {
- // Node 10 is missing some of the patches to V8 that improve coverage in
- // newer Node.js versions, for this reason it requires its own snapshot file.
- if (nodeMajorVersion === 10) {
- const file = this.currentTest.file
- this.currentTest.file = `${file}_10`
- }
chaiJestSnapshot.configureUsingMochaContext(this)
})
@@ -298,7 +291,6 @@ beforeEach(function () {
describe('ESM Modules', () => {
it('collects coverage for ESM modules', () => {
- if (nodeMajorVersion === 10) return
const { output } = spawnSync(nodePath, [
c8Path,
'--exclude="test/*.js"',
diff --git a/test/integration.js_10.snap b/test/integration.js_10.snap
deleted file mode 100644
index 2e86377b..00000000
--- a/test/integration.js_10.snap
+++ /dev/null
@@ -1,1413 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`c8 /* c8 ignore next */ does not incorrectly mark previous branch as uncovered (see #254) 1`] = `
-",--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- issue-254.js | 100 | 100 | 100 | 100 |
---------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 /* c8 ignore next */ ignores lines with special comment 1`] = `
-",covered
-covered
--------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------|---------|----------|---------|---------|-------------------
-All files | 90.9 | 100 | 100 | 90.9 |
- c8-ignore-next.js | 90.9 | 100 | 100 | 90.9 | 21-22
--------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 /* c8 ignore start/stop */ ignores lines with special comment 1`] = `
-",covered
-covered
--------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------------|---------|----------|---------|---------|-------------------
-All files | 100 | 75 | 100 | 100 |
- c8-ignore-start-stop.js | 100 | 75 | 100 | 100 | 2
--------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 --all reports coverage for unloaded js files as 0 for line, branch and function 1`] = `
-",zero
-positive
-negative
---------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 64.28 | 66.66 | 50 | 64.28 |
- vanilla | 78.26 | 75 | 100 | 78.26 |
- loaded.js | 73.68 | 71.42 | 100 | 73.68 | 4-5,16-18
- main.js | 100 | 100 | 100 | 100 |
- vanilla/dir | 0 | 0 | 0 | 0 |
- unloaded.js | 0 | 0 | 0 | 0 | 1-5
---------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 --all reports coverage for unloaded transpiled ts files as 0 for line, branch and function 1`] = `
-",zero
-positive
-negative
------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|-------------------
-All files | 64.28 | 57.14 | 50 | 64.28 |
- ts-compiled | 78.26 | 66.66 | 100 | 78.26 |
- loaded.ts | 73.68 | 66.66 | 100 | 73.68 | 4-5,16-18
- main.ts | 100 | 100 | 100 | 100 |
- ts-compiled/dir | 0 | 0 | 0 | 0 |
- unloaded.ts | 0 | 0 | 0 | 0 | 1-5
------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 --all reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node 1`] = `
-",zero
-positive
-negative
---------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 75 | 77.77 | 66.66 | 75 |
- ts-only | 91.3 | 87.5 | 100 | 91.3 |
- loaded.ts | 89.47 | 83.33 | 100 | 89.47 | 8-9
- main.ts | 100 | 100 | 100 | 100 |
- ts-only/dir | 0 | 0 | 0 | 0 |
- unloaded.ts | 0 | 0 | 0 | 0 | 1-5
---------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 --all should allow for --all to be used in conjunction with --check-coverage 1`] = `
-",zero
-positive
-negative
---------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 64.28 | 66.66 | 50 | 64.28 |
- vanilla | 78.26 | 75 | 100 | 78.26 |
- loaded.js | 73.68 | 71.42 | 100 | 73.68 | 4-5,16-18
- main.js | 100 | 100 | 100 | 100 |
- vanilla/dir | 0 | 0 | 0 | 0 |
- unloaded.js | 0 | 0 | 0 | 0 | 1-5
---------------|---------|----------|---------|---------|-------------------
-,ERROR: Coverage for lines (64.28%) does not meet global threshold (100%)
-ERROR: Coverage for branches (66.66%) does not meet global threshold (82%)
-ERROR: Coverage for statements (64.28%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 --all should allow for --all to be used with the check-coverage command (2 invocations) 1`] = `
-",,ERROR: Coverage for lines (64.28%) does not meet global threshold (90%)
-ERROR: Coverage for branches (66.66%) does not meet global threshold (82%)
-ERROR: Coverage for statements (64.28%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 --exclude-after-remap applies exclude rules after source-maps are applied 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- branch-2.js | 100 | 100 | 100 | 100 |
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 --extension includes coverage when extensions specified 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
---------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------|---------|----------|---------|---------|-------------------
-All files | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 --extension includes coverage when extensions specified with --all 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
----------------------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------------------------|---------|----------|---------|---------|-------------------
-All files | 1.81 | 12.24 | 8.33 | 1.81 |
- 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-52
- 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 |
- is-cjs-esm-bridge.js | 0 | 0 | 0 | 0 | 1-10
- parse-args.js | 0 | 0 | 0 | 0 | 1-224
- report.js | 0 | 0 | 0 | 0 | 1-417
- 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-42
- c8/test/fixtures | 16.3 | 37.5 | 26.66 | 16.3 |
- async.js | 100 | 100 | 100 | 100 |
- c8-ignore-next.js | 0 | 0 | 0 | 0 | 1-22
- c8-ignore-start-stop.js | 0 | 0 | 0 | 0 | 1-21
- 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
- issue-254.js | 0 | 0 | 0 | 0 | 1-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/ts-compiled | 0 | 0 | 0 | 0 |
- loaded.ts | 0 | 0 | 0 | 0 | 1-19
- main.ts | 0 | 0 | 0 | 0 | 1-4
- c8/test/fixtures/all/ts-compiled/dir | 0 | 0 | 0 | 0 |
- unloaded.ts | 0 | 0 | 0 | 0 | 1-5
- c8/test/fixtures/all/vanilla | 0 | 0 | 0 | 0 |
- loaded.js | 0 | 0 | 0 | 0 | 1-19
- main.js | 0 | 0 | 0 | 0 | 1-4
- c8/test/fixtures/all/vanilla/dir | 0 | 0 | 0 | 0 |
- unloaded.js | 0 | 0 | 0 | 0 | 1-5
- c8/test/fixtures/multidir1 | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
- c8/test/fixtures/multidir2 | 0 | 0 | 0 | 0 |
- file2.js | 0 | 0 | 0 | 0 | 1
- c8/test/fixtures/report | 0 | 0 | 0 | 0 |
- allowExternal.js | 0 | 0 | 0 | 0 | 1
- report-multi-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- report-single-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- srcOverride.js | 0 | 0 | 0 | 0 | 1
- c8/test/fixtures/source-maps | 0 | 0 | 0 | 0 |
- branches.js | 0 | 0 | 0 | 0 | 1-20
- fake-source-map.js | 0 | 0 | 0 | 0 | 1-7
- c8/test/fixtures/source-maps/branches | 0 | 0 | 0 | 0 |
- branch-1.js | 0 | 0 | 0 | 0 | 1-12
- branch-2.js | 0 | 0 | 0 | 0 | 1-9
- branches.js | 0 | 0 | 0 | 0 | 1-20
- branches.typescript.ts | 0 | 0 | 0 | 0 | 1-25
- c8/test/fixtures/source-maps/classes | 0 | 0 | 0 | 0 |
- class-1.js | 0 | 0 | 0 | 0 | 1-5
- class-2.js | 0 | 0 | 0 | 0 | 1-23
- classes.js | 0 | 0 | 0 | 0 | 1-27
- classes.typescript.ts | 0 | 0 | 0 | 0 | 1-33
----------------------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 check-coverage --100 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
-All files | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
------------|---------|----------|---------|---------|-------------------
-,ERROR: Coverage for lines (83.33%) does not meet global threshold (100%)
-ERROR: Coverage for functions (66.66%) does not meet global threshold (100%)
-ERROR: Coverage for branches (85.71%) does not meet global threshold (100%)
-ERROR: Coverage for statements (83.33%) does not meet global threshold (100%)
-"
-`;
-
-exports[`c8 check-coverage allows --check-coverage when executing script 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
---------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 71.81 | 57.95 | 61.9 | 71.81 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.23 | 53.22 | 70.37 | 75.23 |
- is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.26 | 56.09 | 75 | 70.26 | ...361,367-369,390-395,406-407
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------------|---------|----------|---------|---------|--------------------------------
-,ERROR: Coverage for lines (71.81%) does not meet global threshold (101%)
-ERROR: Coverage for branches (57.95%) does not meet global threshold (82%)
-ERROR: Coverage for statements (71.81%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 check-coverage allows threshold to be applied on per-file basis 1`] = `
-",,ERROR: Coverage for lines (78.84%) does not meet threshold (101%) for bin/c8.js
-ERROR: Coverage for branches (60%) does not meet threshold (82%) for bin/c8.js
-ERROR: Coverage for statements (78.84%) does not meet threshold (95%) for bin/c8.js
-ERROR: Coverage for lines (18.57%) does not meet threshold (101%) for lib/commands/check-coverage.js
-ERROR: Coverage for statements (18.57%) does not meet threshold (95%) for lib/commands/check-coverage.js
-ERROR: Coverage for lines (80.95%) does not meet threshold (101%) for lib/commands/report.js
-ERROR: Coverage for branches (62.5%) does not meet threshold (82%) for lib/commands/report.js
-ERROR: Coverage for statements (80.95%) does not meet threshold (95%) for lib/commands/report.js
-ERROR: Coverage for lines (90%) does not meet threshold (101%) for lib/is-cjs-esm-bridge.js
-ERROR: Coverage for branches (25%) does not meet threshold (82%) for lib/is-cjs-esm-bridge.js
-ERROR: Coverage for statements (90%) does not meet threshold (95%) for lib/is-cjs-esm-bridge.js
-ERROR: Coverage for lines (97.32%) does not meet threshold (101%) for lib/parse-args.js
-ERROR: Coverage for branches (58.33%) does not meet threshold (82%) for lib/parse-args.js
-ERROR: Coverage for lines (70.26%) does not meet threshold (101%) for lib/report.js
-ERROR: Coverage for branches (56.09%) does not meet threshold (82%) for lib/report.js
-ERROR: Coverage for statements (70.26%) does not meet threshold (95%) for lib/report.js
-ERROR: Coverage for lines (45%) does not meet threshold (101%) for lib/source-map-from-file.js
-ERROR: Coverage for statements (45%) does not meet threshold (95%) for lib/source-map-from-file.js
-ERROR: Coverage for lines (100%) does not meet threshold (101%) for test/fixtures/async.js
-ERROR: Coverage for lines (75%) does not meet threshold (101%) for test/fixtures/normal.js
-ERROR: Coverage for branches (66.66%) does not meet threshold (82%) for test/fixtures/normal.js
-ERROR: Coverage for statements (75%) does not meet threshold (95%) for test/fixtures/normal.js
-"
-`;
-
-exports[`c8 check-coverage check-coverage command with --100 1`] = `
-",,ERROR: Coverage for lines (75.18%) does not meet global threshold (100%)
-ERROR: Coverage for functions (65.9%) does not meet global threshold (100%)
-ERROR: Coverage for branches (61.11%) does not meet global threshold (100%)
-ERROR: Coverage for statements (75.18%) does not meet global threshold (100%)
-"
-`;
-
-exports[`c8 check-coverage exits with 0 if coverage within threshold 1`] = `",,"`;
-
-exports[`c8 check-coverage exits with 1 if coverage is below threshold 1`] = `
-",,ERROR: Coverage for lines (71.81%) does not meet global threshold (101%)
-ERROR: Coverage for branches (57.95%) does not meet global threshold (82%)
-ERROR: Coverage for statements (71.81%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 cobertura report escapes special characters 1`] = `
-"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-"
-`;
-
-exports[`c8 collects coverage for script with shebang 1`] = `
-",hello world
-------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------|---------|----------|---------|---------|-------------------
-All files | 75 | 50 | 100 | 75 |
- shebang.js | 75 | 50 | 100 | 75 | 7-8
-------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync /* c8 ignore next */ does not incorrectly mark previous branch as uncovered (see #254) 1`] = `
-",--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- issue-254.js | 100 | 100 | 100 | 100 |
---------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync /* c8 ignore next */ ignores lines with special comment 1`] = `
-",covered
-covered
---------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 71.82 | 57.14 | 62.16 | 71.82 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.23 | 51.66 | 70.37 | 75.23 |
- is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.26 | 53.84 | 75 | 70.26 | ...361,367-369,390-395,406-407
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 90.9 | 100 | 100 | 90.9 |
- c8-ignore-next.js | 90.9 | 100 | 100 | 90.9 | 21-22
---------------------------|---------|----------|---------|---------|--------------------------------
-,"
-`;
-
-exports[`c8 mergeAsync /* c8 ignore start/stop */ ignores lines with special comment 1`] = `
-",covered
-covered
---------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 72 | 55.42 | 62.16 | 72 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.23 | 51.66 | 70.37 | 75.23 |
- is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.26 | 53.84 | 75 | 70.26 | ...361,367-369,390-395,406-407
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 100 | 75 | 100 | 100 |
- c8-ignore-start-stop.js | 100 | 75 | 100 | 100 | 2
---------------------------|---------|----------|---------|---------|--------------------------------
-,"
-`;
-
-exports[`c8 mergeAsync --all reports coverage for unloaded js files as 0 for line, branch and function 1`] = `
-",zero
-positive
-negative
---------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 64.28 | 66.66 | 50 | 64.28 |
- vanilla | 78.26 | 75 | 100 | 78.26 |
- loaded.js | 73.68 | 71.42 | 100 | 73.68 | 4-5,16-18
- main.js | 100 | 100 | 100 | 100 |
- vanilla/dir | 0 | 0 | 0 | 0 |
- unloaded.js | 0 | 0 | 0 | 0 | 1-5
---------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync --all reports coverage for unloaded transpiled ts files as 0 for line, branch and function 1`] = `
-",zero
-positive
-negative
------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|-------------------
-All files | 64.28 | 57.14 | 50 | 64.28 |
- ts-compiled | 78.26 | 66.66 | 100 | 78.26 |
- loaded.ts | 73.68 | 66.66 | 100 | 73.68 | 4-5,16-18
- main.ts | 100 | 100 | 100 | 100 |
- ts-compiled/dir | 0 | 0 | 0 | 0 |
- unloaded.ts | 0 | 0 | 0 | 0 | 1-5
------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync --all reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node 1`] = `
-",zero
-positive
-negative
---------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 75 | 77.77 | 66.66 | 75 |
- ts-only | 91.3 | 87.5 | 100 | 91.3 |
- loaded.ts | 89.47 | 83.33 | 100 | 89.47 | 8-9
- main.ts | 100 | 100 | 100 | 100 |
- ts-only/dir | 0 | 0 | 0 | 0 |
- unloaded.ts | 0 | 0 | 0 | 0 | 1-5
---------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync --all should allow for --all to be used in conjunction with --check-coverage 1`] = `
-",zero
-positive
-negative
---------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------
-All files | 64.28 | 66.66 | 50 | 64.28 |
- vanilla | 78.26 | 75 | 100 | 78.26 |
- loaded.js | 73.68 | 71.42 | 100 | 73.68 | 4-5,16-18
- main.js | 100 | 100 | 100 | 100 |
- vanilla/dir | 0 | 0 | 0 | 0 |
- unloaded.js | 0 | 0 | 0 | 0 | 1-5
---------------|---------|----------|---------|---------|-------------------
-,ERROR: Coverage for lines (64.28%) does not meet global threshold (100%)
-ERROR: Coverage for branches (66.66%) does not meet global threshold (82%)
-ERROR: Coverage for statements (64.28%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 mergeAsync --all should allow for --all to be used with the check-coverage command (2 invocations) 1`] = `
-",,ERROR: Coverage for lines (64.28%) does not meet global threshold (90%)
-ERROR: Coverage for branches (66.66%) does not meet global threshold (82%)
-ERROR: Coverage for statements (64.28%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 mergeAsync --exclude-after-remap applies exclude rules after source-maps are applied 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- branch-2.js | 100 | 100 | 100 | 100 |
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync --extension includes coverage when extensions specified 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
---------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------|---------|----------|---------|---------|-------------------
-All files | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- custom-ext.special | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync --extension includes coverage when extensions specified with --all 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
----------------------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------------------------|---------|----------|---------|---------|-------------------
-All files | 1.81 | 12.24 | 8.33 | 1.81 |
- 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-52
- 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 |
- is-cjs-esm-bridge.js | 0 | 0 | 0 | 0 | 1-10
- parse-args.js | 0 | 0 | 0 | 0 | 1-224
- report.js | 0 | 0 | 0 | 0 | 1-417
- 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-42
- c8/test/fixtures | 16.3 | 37.5 | 26.66 | 16.3 |
- async.js | 100 | 100 | 100 | 100 |
- c8-ignore-next.js | 0 | 0 | 0 | 0 | 1-22
- c8-ignore-start-stop.js | 0 | 0 | 0 | 0 | 1-21
- 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
- issue-254.js | 0 | 0 | 0 | 0 | 1-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/ts-compiled | 0 | 0 | 0 | 0 |
- loaded.ts | 0 | 0 | 0 | 0 | 1-19
- main.ts | 0 | 0 | 0 | 0 | 1-4
- c8/test/fixtures/all/ts-compiled/dir | 0 | 0 | 0 | 0 |
- unloaded.ts | 0 | 0 | 0 | 0 | 1-5
- c8/test/fixtures/all/vanilla | 0 | 0 | 0 | 0 |
- loaded.js | 0 | 0 | 0 | 0 | 1-19
- main.js | 0 | 0 | 0 | 0 | 1-4
- c8/test/fixtures/all/vanilla/dir | 0 | 0 | 0 | 0 |
- unloaded.js | 0 | 0 | 0 | 0 | 1-5
- c8/test/fixtures/multidir1 | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
- c8/test/fixtures/multidir2 | 0 | 0 | 0 | 0 |
- file2.js | 0 | 0 | 0 | 0 | 1
- c8/test/fixtures/report | 0 | 0 | 0 | 0 |
- allowExternal.js | 0 | 0 | 0 | 0 | 1
- report-multi-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- report-single-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- srcOverride.js | 0 | 0 | 0 | 0 | 1
- c8/test/fixtures/source-maps | 0 | 0 | 0 | 0 |
- branches.js | 0 | 0 | 0 | 0 | 1-20
- fake-source-map.js | 0 | 0 | 0 | 0 | 1-7
- c8/test/fixtures/source-maps/branches | 0 | 0 | 0 | 0 |
- branch-1.js | 0 | 0 | 0 | 0 | 1-12
- branch-2.js | 0 | 0 | 0 | 0 | 1-9
- branches.js | 0 | 0 | 0 | 0 | 1-20
- branches.typescript.ts | 0 | 0 | 0 | 0 | 1-25
- c8/test/fixtures/source-maps/classes | 0 | 0 | 0 | 0 |
- class-1.js | 0 | 0 | 0 | 0 | 1-5
- class-2.js | 0 | 0 | 0 | 0 | 1-23
- classes.js | 0 | 0 | 0 | 0 | 1-27
- classes.typescript.ts | 0 | 0 | 0 | 0 | 1-33
----------------------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync check-coverage --100 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
-All files | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
------------|---------|----------|---------|---------|-------------------
-,ERROR: Coverage for lines (83.33%) does not meet global threshold (100%)
-ERROR: Coverage for functions (66.66%) does not meet global threshold (100%)
-ERROR: Coverage for branches (85.71%) does not meet global threshold (100%)
-ERROR: Coverage for statements (83.33%) does not meet global threshold (100%)
-"
-`;
-
-exports[`c8 mergeAsync check-coverage allows --check-coverage when executing script 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
---------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 78.33 | 69.64 | 68.18 | 78.33 |
- bin | 82.69 | 70 | 66.66 | 82.69 |
- c8.js | 82.69 | 70 | 66.66 | 82.69 | 22,27-29,41-43,50-51
- lib | 79.22 | 64.93 | 74.07 | 79.22 |
- is-cjs-esm-bridge.js | 90 | 62.5 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 77.45 | 66.07 | 81.25 | 77.45 | ...333,360-361,367-369,390-395
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 68.75 | 83.33 | 50 | 68.75 |
- check-coverage.js | 52.85 | 75 | 50 | 52.85 | 9-11,14-36,47-49,61-64
- report.js | 95.23 | 90 | 50 | 95.23 | 9-10
- test/fixtures | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------------|---------|----------|---------|---------|--------------------------------
-,ERROR: Coverage for lines (78.33%) does not meet global threshold (101%)
-ERROR: Coverage for branches (69.64%) does not meet global threshold (82%)
-ERROR: Coverage for statements (78.33%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 mergeAsync check-coverage allows threshold to be applied on per-file basis 1`] = `
-",,ERROR: Coverage for lines (82.69%) does not meet threshold (101%) for bin/c8.js
-ERROR: Coverage for branches (70%) does not meet threshold (82%) for bin/c8.js
-ERROR: Coverage for statements (82.69%) does not meet threshold (95%) for bin/c8.js
-ERROR: Coverage for lines (52.85%) does not meet threshold (101%) for lib/commands/check-coverage.js
-ERROR: Coverage for branches (75%) does not meet threshold (82%) for lib/commands/check-coverage.js
-ERROR: Coverage for statements (52.85%) does not meet threshold (95%) for lib/commands/check-coverage.js
-ERROR: Coverage for lines (95.23%) does not meet threshold (101%) for lib/commands/report.js
-ERROR: Coverage for lines (90%) does not meet threshold (101%) for lib/is-cjs-esm-bridge.js
-ERROR: Coverage for branches (62.5%) does not meet threshold (82%) for lib/is-cjs-esm-bridge.js
-ERROR: Coverage for statements (90%) does not meet threshold (95%) for lib/is-cjs-esm-bridge.js
-ERROR: Coverage for lines (97.32%) does not meet threshold (101%) for lib/parse-args.js
-ERROR: Coverage for branches (58.33%) does not meet threshold (82%) for lib/parse-args.js
-ERROR: Coverage for lines (77.45%) does not meet threshold (101%) for lib/report.js
-ERROR: Coverage for branches (66.07%) does not meet threshold (82%) for lib/report.js
-ERROR: Coverage for statements (77.45%) does not meet threshold (95%) for lib/report.js
-ERROR: Coverage for lines (45%) does not meet threshold (101%) for lib/source-map-from-file.js
-ERROR: Coverage for statements (45%) does not meet threshold (95%) for lib/source-map-from-file.js
-ERROR: Coverage for lines (100%) does not meet threshold (101%) for test/fixtures/async.js
-ERROR: Coverage for lines (75%) does not meet threshold (101%) for test/fixtures/normal.js
-ERROR: Coverage for branches (66.66%) does not meet threshold (82%) for test/fixtures/normal.js
-ERROR: Coverage for statements (75%) does not meet threshold (95%) for test/fixtures/normal.js
-"
-`;
-
-exports[`c8 mergeAsync check-coverage check-coverage command with --100 1`] = `
-",,ERROR: Coverage for lines (75.18%) does not meet global threshold (100%)
-ERROR: Coverage for functions (63.63%) does not meet global threshold (100%)
-ERROR: Coverage for branches (60.21%) does not meet global threshold (100%)
-ERROR: Coverage for statements (75.18%) does not meet global threshold (100%)
-"
-`;
-
-exports[`c8 mergeAsync check-coverage exits with 0 if coverage within threshold 1`] = `",,"`;
-
-exports[`c8 mergeAsync check-coverage exits with 1 if coverage is below threshold 1`] = `
-",,ERROR: Coverage for lines (78.33%) does not meet global threshold (101%)
-ERROR: Coverage for branches (69.64%) does not meet global threshold (82%)
-ERROR: Coverage for statements (78.33%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 mergeAsync cobertura report escapes special characters 1`] = `
-"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-"
-`;
-
-exports[`c8 mergeAsync collects coverage for script with shebang 1`] = `
-",hello world
---------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 71.39 | 54.32 | 61.11 | 71.39 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.23 | 51.66 | 70.37 | 75.23 |
- is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.26 | 53.84 | 75 | 70.26 | ...361,367-369,390-395,406-407
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 75 | 50 | 100 | 75 |
- shebang.js | 75 | 50 | 100 | 75 | 7-8
---------------------------|---------|----------|---------|---------|--------------------------------
-,"
-`;
-
-exports[`c8 mergeAsync merges reports from subprocesses together 1`] = `
-",first
-
-second
-
---------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 72.39 | 64.44 | 63.15 | 72.39 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.49 | 61.53 | 70.37 | 75.49 |
- is-cjs-esm-bridge.js | 90 | 62.5 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.74 | 61.36 | 75 | 70.74 | ...333,360-361,367-369,390-395
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 100 | 100 | 100 | 100 |
- multiple-spawn.js | 100 | 100 | 100 | 100 |
- subprocess.js | 100 | 100 | 100 | 100 |
---------------------------|---------|----------|---------|---------|--------------------------------
-,"
-`;
-
-exports[`c8 mergeAsync report generates report from existing temporary files 1`] = `
-",--------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 74.97 | 65.04 | 64.28 | 74.97 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 79.22 | 63.63 | 74.07 | 79.22 |
- is-cjs-esm-bridge.js | 90 | 62.5 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 77.45 | 64.28 | 81.25 | 77.45 | ...333,360-361,367-369,390-395
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------------|---------|----------|---------|---------|--------------------------------
-,"
-`;
-
-exports[`c8 mergeAsync report supports --check-coverage, when generating reports 1`] = `
-",--------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 74.97 | 65.04 | 64.28 | 74.97 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 79.22 | 63.63 | 74.07 | 79.22 |
- is-cjs-esm-bridge.js | 90 | 62.5 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 77.45 | 64.28 | 81.25 | 77.45 | ...333,360-361,367-369,390-395
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------------|---------|----------|---------|---------|--------------------------------
-,ERROR: Coverage for lines (74.97%) does not meet global threshold (101%)
-ERROR: Coverage for branches (65.04%) does not meet global threshold (82%)
-ERROR: Coverage for statements (74.97%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 mergeAsync report supports reporting on directories outside cwd 1`] = `
-",-----------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
-All files | 0 | 0 | 0 | 0 |
- multidir1 | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
- multidir2 | 0 | 0 | 0 | 0 |
- file2.js | 0 | 0 | 0 | 0 | 1
------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync report supports reporting on single directories outside cwd 1`] = `
-",----------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------|---------|----------|---------|---------|-------------------
-All files | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
-----------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync reports coverage for script that exits normally 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
---------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 71.81 | 57.95 | 61.9 | 71.81 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.23 | 53.22 | 70.37 | 75.23 |
- is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.26 | 56.09 | 75 | 70.26 | ...361,367-369,390-395,406-407
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------------|---------|----------|---------|---------|--------------------------------
-,"
-`;
-
-exports[`c8 mergeAsync should allow for files outside of cwd 1`] = `
-",hi
--------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- multidir1 | 100 | 100 | 100 | 100 |
- file1.js | 100 | 100 | 100 | 100 |
- report | 100 | 100 | 100 | 100 |
- allowExternal.js | 100 | 100 | 100 | 100 |
--------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync should allow for multiple overrides of src location for --all 1`] = `
-",hihi
---------------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------------|---------|----------|---------|---------|-------------------
-All files | 3.57 | 16.66 | 0 | 3.57 |
- multidir1 | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
- multidir2 | 0 | 0 | 0 | 0 |
- file2.js | 0 | 0 | 0 | 0 | 1
- report | 3.84 | 25 | 0 | 3.84 |
- allowExternal.js | 0 | 0 | 0 | 0 | 1
- report-multi-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- report-single-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- srcOverride.js | 100 | 100 | 100 | 100 |
---------------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps TypeScript remaps branches 1`] = `
-",reachable
-a = true
-a = false
-------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------|---------|----------|---------|---------|-------------------
-All files | 84 | 57.14 | 100 | 84 |
- branches.typescript.ts | 84 | 57.14 | 100 | 84 | 7,11-12,18
-------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps TypeScript remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------------|---------|----------|---------|---------|-------------------
-All files | 81.81 | 85.71 | 60 | 81.81 |
- classes.typescript.ts | 81.81 | 85.71 | 60 | 81.81 | 12-13,21-22,27-28
------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps UglifyJS remaps branches 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 80 | 50 | 100 | 80 |
- branches.js | 80 | 50 | 100 | 80 | 2,5-6,13
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps UglifyJS remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------|---------|----------|---------|---------|-------------------
-All files | 85.18 | 83.33 | 60 | 85.18 |
- classes.js | 85.18 | 83.33 | 60 | 85.18 | 6-7,15,21
-------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps does not attempt to load source map URLs that aren't 1`] = `
-",--------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------|---------|----------|---------|---------|-------------------
-All files | 71.42 | 50 | 100 | 71.42 |
- fake-source-map.js | 71.42 | 50 | 100 | 71.42 | 5-6
---------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps nyc remaps branches 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 80 | 40 | 100 | 80 |
- branches.js | 80 | 40 | 100 | 80 | 2,6-7,13
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps nyc remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------|---------|----------|---------|---------|-------------------
-All files | 77.77 | 83.33 | 60 | 77.77 |
- classes.js | 77.77 | 83.33 | 60 | 77.77 | 7-8,15-16,21-22
-------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps rollup remaps branches 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- branch-1.js | 100 | 100 | 100 | 100 |
- branch-2.js | 100 | 100 | 100 | 100 |
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps rollup remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------|---------|----------|---------|---------|-------------------
-All files | 78.57 | 83.33 | 60 | 78.57 |
- class-1.js | 100 | 100 | 100 | 100 |
- class-2.js | 73.91 | 83.33 | 60 | 73.91 | 7-8,15-16,21-22
-------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync source-maps ts-node reads source-map from cache, and applies to coverage 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|----------|---------|---------|-------------------
-All files | 76.47 | 85.71 | 60 | 76.47 |
- ts-node-basic.ts | 76.47 | 85.71 | 60 | 76.47 | 13-16,25-26,33-34
-------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 mergeAsync supports externally set NODE_V8_COVERAGE 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
-All files | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 merges reports from subprocesses together 1`] = `
-",first
-
-second
-
--------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- multiple-spawn.js | 100 | 100 | 100 | 100 |
- subprocess.js | 100 | 100 | 100 | 100 |
--------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 report generates report from existing temporary files 1`] = `
-",--------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 71.81 | 57.95 | 61.9 | 71.81 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.23 | 53.22 | 70.37 | 75.23 |
- is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.26 | 56.09 | 75 | 70.26 | ...361,367-369,390-395,406-407
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------------|---------|----------|---------|---------|--------------------------------
-,"
-`;
-
-exports[`c8 report supports --check-coverage, when generating reports 1`] = `
-",--------------------------|---------|----------|---------|---------|--------------------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|--------------------------------
-All files | 71.81 | 57.95 | 61.9 | 71.81 |
- bin | 78.84 | 60 | 66.66 | 78.84 |
- c8.js | 78.84 | 60 | 66.66 | 78.84 | 22,27-29,32-33,41-43,50-51
- lib | 75.23 | 53.22 | 70.37 | 75.23 |
- is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9
- parse-args.js | 97.32 | 58.33 | 100 | 97.32 | 165-166,187-188,201-202
- report.js | 70.26 | 56.09 | 75 | 70.26 | ...361,367-369,390-395,406-407
- source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98
- lib/commands | 41.96 | 66.66 | 16.66 | 41.96 |
- check-coverage.js | 18.57 | 100 | 0 | 18.57 | 9-11,14-36,39-53,55-70
- report.js | 80.95 | 62.5 | 50 | 80.95 | 9-10,15-20
- test/fixtures | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
---------------------------|---------|----------|---------|---------|--------------------------------
-,ERROR: Coverage for lines (71.81%) does not meet global threshold (101%)
-ERROR: Coverage for branches (57.95%) does not meet global threshold (82%)
-ERROR: Coverage for statements (71.81%) does not meet global threshold (95%)
-"
-`;
-
-exports[`c8 report supports reporting on directories outside cwd 1`] = `
-",-----------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
-All files | 0 | 0 | 0 | 0 |
- multidir1 | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
- multidir2 | 0 | 0 | 0 | 0 |
- file2.js | 0 | 0 | 0 | 0 | 1
------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 report supports reporting on single directories outside cwd 1`] = `
-",----------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------|---------|----------|---------|---------|-------------------
-All files | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
-----------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 reports coverage for script that exits normally 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
-All files | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 should allow for files outside of cwd 1`] = `
-",hi
--------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- multidir1 | 100 | 100 | 100 | 100 |
- file1.js | 100 | 100 | 100 | 100 |
- report | 100 | 100 | 100 | 100 |
- allowExternal.js | 100 | 100 | 100 | 100 |
--------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 should allow for multiple overrides of src location for --all 1`] = `
-",hihi
---------------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------------|---------|----------|---------|---------|-------------------
-All files | 3.57 | 16.66 | 0 | 3.57 |
- multidir1 | 0 | 0 | 0 | 0 |
- file1.js | 0 | 0 | 0 | 0 | 1
- multidir2 | 0 | 0 | 0 | 0 |
- file2.js | 0 | 0 | 0 | 0 | 1
- report | 3.84 | 25 | 0 | 3.84 |
- allowExternal.js | 0 | 0 | 0 | 0 | 1
- report-multi-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- report-single-dir-external.js | 0 | 0 | 0 | 0 | 1-12
- srcOverride.js | 100 | 100 | 100 | 100 |
---------------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps TypeScript remaps branches 1`] = `
-",reachable
-a = true
-a = false
-------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------|---------|----------|---------|---------|-------------------
-All files | 84 | 57.14 | 100 | 84 |
- branches.typescript.ts | 84 | 57.14 | 100 | 84 | 7,11-12,18
-------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps TypeScript remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
------------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------------|---------|----------|---------|---------|-------------------
-All files | 81.81 | 85.71 | 60 | 81.81 |
- classes.typescript.ts | 81.81 | 85.71 | 60 | 81.81 | 12-13,21-22,27-28
------------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps UglifyJS remaps branches 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 80 | 50 | 100 | 80 |
- branches.js | 80 | 50 | 100 | 80 | 2,5-6,13
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps UglifyJS remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------|---------|----------|---------|---------|-------------------
-All files | 85.18 | 83.33 | 60 | 85.18 |
- classes.js | 85.18 | 83.33 | 60 | 85.18 | 6-7,15,21
-------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps does not attempt to load source map URLs that aren't 1`] = `
-",--------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------|---------|----------|---------|---------|-------------------
-All files | 71.42 | 50 | 100 | 71.42 |
- fake-source-map.js | 71.42 | 50 | 100 | 71.42 | 5-6
---------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps nyc remaps branches 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 80 | 40 | 100 | 80 |
- branches.js | 80 | 40 | 100 | 80 | 2,6-7,13
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps nyc remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------|---------|----------|---------|---------|-------------------
-All files | 77.77 | 83.33 | 60 | 77.77 |
- classes.js | 77.77 | 83.33 | 60 | 77.77 | 7-8,15-16,21-22
-------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps rollup remaps branches 1`] = `
-",reachable
-a = true
-a = false
--------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
-All files | 100 | 100 | 100 | 100 |
- branch-1.js | 100 | 100 | 100 | 100 |
- branch-2.js | 100 | 100 | 100 | 100 |
--------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps rollup remaps classes 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------|---------|----------|---------|---------|-------------------
-All files | 78.57 | 83.33 | 60 | 78.57 |
- class-1.js | 100 | 100 | 100 | 100 |
- class-2.js | 73.91 | 83.33 | 60 | 73.91 | 7-8,15-16,21-22
-------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 source-maps ts-node reads source-map from cache, and applies to coverage 1`] = `
-",covered
-covered
-covered
-covered
-covered
-------------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------|---------|----------|---------|---------|-------------------
-All files | 76.47 | 85.71 | 60 | 76.47 |
- ts-node-basic.ts | 76.47 | 85.71 | 60 | 76.47 | 13-16,25-26,33-34
-------------------|---------|----------|---------|---------|-------------------
-,"
-`;
-
-exports[`c8 supports externally set NODE_V8_COVERAGE 1`] = `
-",hey
-i am a line of code
-what
-hey
-what
-hey
-what
-hey
------------|---------|----------|---------|---------|-------------------
-File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
-All files | 83.33 | 85.71 | 66.66 | 83.33 |
- async.js | 100 | 100 | 100 | 100 |
- normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20
------------|---------|----------|---------|---------|-------------------
-,"
-`;