From 66cd626aff08e3d0dbc05d5764369d587de100b9 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Thu, 30 Sep 2021 17:36:58 -0700 Subject: [PATCH 01/11] test: --100 --- test/integration.js | 17 +++++++++++++++++ test/integration.js.snap | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/test/integration.js b/test/integration.js index 5c6b0e20..746c7415 100644 --- a/test/integration.js +++ b/test/integration.js @@ -211,6 +211,23 @@ describe('c8', () => { status.should.equal(1) output.toString('utf8').should.matchSnapshot() }) + + it('--100 ', () => { + const { output, status } = spawnSync(nodePath, [ + c8Path, + '--exclude="test/*.js"', + '--temp-directory=tmp/check-coverage', + '--100', + nodePath, + require.resolve('./fixtures/normal') + ]) + console.log(`output`); + console.log(output.toString("utf8")); + + status.should.equal(1) + output.toString('utf8').should.matchSnapshot() + + }) }) describe('report', () => { diff --git a/test/integration.js.snap b/test/integration.js.snap index afefe7c4..73896d2a 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -152,6 +152,25 @@ All files | 100 | 100 | 100 | 100 | ," `; +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 | 60 | 83.33 | + async.js | 100 | 100 | 100 | 100 | + normal.js | 75 | 66.66 | 33.33 | 75 | 14-16,18-20 +-----------|---------|----------|---------|---------|------------------- +," +`; + exports[`c8 check-coverage allows --check-coverage when executing script 1`] = ` ",hey i am a line of code From 3aecef0072159d0bf3cd7677c3fc35765bd7b664 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Thu, 30 Sep 2021 17:37:25 -0700 Subject: [PATCH 02/11] WIP attempt to use YARGS middleware to set branches/functions/lines/statements when 100 is set --- lib/parse-args.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/parse-args.js b/lib/parse-args.js index 52d43318..1fc8e3f0 100644 --- a/lib/parse-args.js +++ b/lib/parse-args.js @@ -107,6 +107,12 @@ function buildYargs (withCommands = false) { description: 'check thresholds per file', type: 'boolean' }) + .option('100', { + default: false, + group: 'Coverage thresholds', + description: 'shortcut for --check-coverage --lines 100 --functions 100 --branches 100 --statements 100', + type: 'boolean' + }) .option('temp-directory', { describe: 'directory V8 coverage data is written to and read from', default: process.env.NODE_V8_COVERAGE @@ -145,6 +151,18 @@ function buildYargs (withCommands = false) { }) .epilog('visit https://git.io/vHysA for list of available reporters') + yargs.middleware((argv) => { + if (!argv[100]) return argv + + return { + ...argv, + branches: 100, + functions: 100, + lines: 100, + statements: 100, + } + }) + const checkCoverage = require('./commands/check-coverage') const report = require('./commands/report') if (withCommands) { From b96dcda73487d90e088e7de79047e78530bac6ba Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:10:22 -0700 Subject: [PATCH 03/11] comment out `yargs.middleware()` and add TODO comment see https://github.com/bcoe/c8/pull/332\#discussion_r721636191 --- lib/parse-args.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/parse-args.js b/lib/parse-args.js index 1fc8e3f0..72eb7b7d 100644 --- a/lib/parse-args.js +++ b/lib/parse-args.js @@ -151,17 +151,18 @@ function buildYargs (withCommands = false) { }) .epilog('visit https://git.io/vHysA for list of available reporters') - yargs.middleware((argv) => { - if (!argv[100]) return argv + // TODO: enable once yargs upgraded to v17: https://github.com/bcoe/c8/pull/332#discussion_r721636191 + // yargs.middleware((argv) => { + // if (!argv['100']) return argv - return { - ...argv, - branches: 100, - functions: 100, - lines: 100, - statements: 100, - } - }) + // return { + // ...argv, + // branches: 100, + // functions: 100, + // lines: 100, + // statements: 100, + // } + // }) const checkCoverage = require('./commands/check-coverage') const report = require('./commands/report') From 279276ea3bf29069101eda5e3ccc12128b5e8a49 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:15:06 -0700 Subject: [PATCH 04/11] add `--100` workaround to `lib/commands/report.js` until the upgrade to yargs 17 with better middleware support --- lib/commands/report.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/commands/report.js b/lib/commands/report.js index e8cc8e60..b34fb84f 100644 --- a/lib/commands/report.js +++ b/lib/commands/report.js @@ -10,6 +10,14 @@ exports.handler = async function (argv) { } exports.outputReport = async function (argv) { + // TODO: this is a workaround until yargs gets upgraded to v17, see https://github.com/bcoe/c8/pull/332#discussion_r721636191 + if (argv['100']) { + argv.checkCoverage = 100 + argv.lines = 100 + argv.functions = 100 + argv.branches = 100 + argv.statement = 100 + } const report = Report({ include: argv.include, exclude: argv.exclude, From 1dc1063895f79de430b03c5963cfb621588a4076 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:21:06 -0700 Subject: [PATCH 05/11] update snapshot for `c8 check-coverage --100` test --- test/integration.js.snap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration.js.snap b/test/integration.js.snap index 73896d2a..df5a2f5d 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -168,7 +168,11 @@ All files | 83.33 | 85.71 | 60 | 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 (60%) 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 (95%) +" `; exports[`c8 check-coverage allows --check-coverage when executing script 1`] = ` From 79bc20c256d52993063a3bd53e134b51e5fb3524 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:21:57 -0700 Subject: [PATCH 06/11] remove `console.log()`s used for debugging --- test/integration.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/integration.js b/test/integration.js index 746c7415..ba6ad1ef 100644 --- a/test/integration.js +++ b/test/integration.js @@ -221,12 +221,9 @@ describe('c8', () => { nodePath, require.resolve('./fixtures/normal') ]) - console.log(`output`); - console.log(output.toString("utf8")); - + status.should.equal(1) output.toString('utf8').should.matchSnapshot() - }) }) From 244af62dd89b500701bb66a5bde9af9a1ae33d24 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:24:49 -0700 Subject: [PATCH 07/11] remove extra space from test label --- test/integration.js | 2 +- test/integration.js.snap | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/test/integration.js b/test/integration.js index ba6ad1ef..c38d29ab 100644 --- a/test/integration.js +++ b/test/integration.js @@ -212,7 +212,7 @@ describe('c8', () => { output.toString('utf8').should.matchSnapshot() }) - it('--100 ', () => { + it('--100', () => { const { output, status } = spawnSync(nodePath, [ c8Path, '--exclude="test/*.js"', diff --git a/test/integration.js.snap b/test/integration.js.snap index df5a2f5d..466576df 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -175,6 +175,29 @@ ERROR: Coverage for statements (83.33%) does not meet global threshold (95%) " `; +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 | 60 | 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 (60%) 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 (95%) +" +`; + exports[`c8 check-coverage allows --check-coverage when executing script 1`] = ` ",hey i am a line of code From 90505eca8cef02a4f8f65ffb2b9c5fd429d0b069 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:28:56 -0700 Subject: [PATCH 08/11] check-coverage command with --100 --- lib/commands/check-coverage.js | 8 ++++++++ test/integration.js | 12 ++++++++++++ test/integration.js.snap | 16 ++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/lib/commands/check-coverage.js b/lib/commands/check-coverage.js index e0b1105f..69b5ccb2 100644 --- a/lib/commands/check-coverage.js +++ b/lib/commands/check-coverage.js @@ -11,6 +11,14 @@ exports.builder = function (yargs) { } exports.handler = function (argv) { + // TODO: this is a workaround until yargs gets upgraded to v17, see https://github.com/bcoe/c8/pull/332#discussion_r721636191 + if (argv['100']) { + argv.lines = 100 + argv.functions = 100 + argv.branches = 100 + argv.statement = 100 + } + const report = Report({ include: argv.include, exclude: argv.exclude, diff --git a/test/integration.js b/test/integration.js index c38d29ab..9e6eac31 100644 --- a/test/integration.js +++ b/test/integration.js @@ -225,6 +225,18 @@ describe('c8', () => { status.should.equal(1) output.toString('utf8').should.matchSnapshot() }) + + it('check-coverage command with --100', () => { + const { output, status } = spawnSync(nodePath, [ + c8Path, + 'check-coverage', + '--exclude="test/*.js"', + '--temp-directory=tmp/check-coverage', + '--100' + ]) + status.should.equal(1) + output.toString('utf8').should.matchSnapshot() + }) }) describe('report', () => { diff --git a/test/integration.js.snap b/test/integration.js.snap index 466576df..7a893bb0 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -227,6 +227,22 @@ ERROR: Coverage for statements (75%) does not meet threshold (95%) for test/fixt " `; +exports[`c8 check-coverage check-coverage --100 1`] = ` +",,ERROR: Coverage for lines (83.33%) does not meet global threshold (100%) +ERROR: Coverage for functions (60%) 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 (95%) +" +`; + +exports[`c8 check-coverage check-coverage command with --100 1`] = ` +",,ERROR: Coverage for lines (83.33%) does not meet global threshold (100%) +ERROR: Coverage for functions (60%) 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 (95%) +" +`; + 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`] = ` From c4286d13e6e6478570128d379b6d6b8f65a42250 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:30:19 -0700 Subject: [PATCH 09/11] set coverage for statements to 100%, too --- lib/commands/check-coverage.js | 4 ++-- lib/commands/report.js | 2 +- test/integration.js.snap | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/commands/check-coverage.js b/lib/commands/check-coverage.js index 69b5ccb2..24adaadf 100644 --- a/lib/commands/check-coverage.js +++ b/lib/commands/check-coverage.js @@ -16,9 +16,9 @@ exports.handler = function (argv) { argv.lines = 100 argv.functions = 100 argv.branches = 100 - argv.statement = 100 + argv.statements = 100 } - + const report = Report({ include: argv.include, exclude: argv.exclude, diff --git a/lib/commands/report.js b/lib/commands/report.js index b34fb84f..568a9428 100644 --- a/lib/commands/report.js +++ b/lib/commands/report.js @@ -16,7 +16,7 @@ exports.outputReport = async function (argv) { argv.lines = 100 argv.functions = 100 argv.branches = 100 - argv.statement = 100 + argv.statements = 100 } const report = Report({ include: argv.include, diff --git a/test/integration.js.snap b/test/integration.js.snap index 7a893bb0..9b7fe463 100644 --- a/test/integration.js.snap +++ b/test/integration.js.snap @@ -194,7 +194,7 @@ All files | 83.33 | 85.71 | 60 | 83.33 | ,ERROR: Coverage for lines (83.33%) does not meet global threshold (100%) ERROR: Coverage for functions (60%) 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 (95%) +ERROR: Coverage for statements (83.33%) does not meet global threshold (100%) " `; @@ -239,7 +239,7 @@ exports[`c8 check-coverage check-coverage command with --100 1`] = ` ",,ERROR: Coverage for lines (83.33%) does not meet global threshold (100%) ERROR: Coverage for functions (60%) 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 (95%) +ERROR: Coverage for statements (83.33%) does not meet global threshold (100%) " `; From cb7c7ed82b4f57bac45574134bf0570d2cb2c0f3 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:34:28 -0700 Subject: [PATCH 10/11] docs(README): `--100` --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 63a5d744..f20523e7 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,24 @@ To check thresholds on a per-file basis run: c8 check-coverage --lines 95 --per-file ``` +If you want to check for 100% coverage across all dimensions, use `--100`: + +```shell +c8 --100 npm test +``` + +Is equivalent to + +```shell +c8 --check-coverage --lines 100 --functions 100 --branches 100 --statements 100 npm test +``` + +The `--100` flag can be set for the `check-coverage` as well: + +```shell +c8 check-coverage --100 +``` + ## Ignoring Uncovered Lines, Functions, and Blocks Sometimes you might find yourself wanting to ignore uncovered portions of your From 08dff42980da6c7534488393e1a89054d7ab1b06 Mon Sep 17 00:00:00 2001 From: bcoe Date: Wed, 6 Oct 2021 08:02:09 -0700 Subject: [PATCH 11/11] build: update Node 10 snapshots --- test/integration.js_10.snap | 97 ++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 33 deletions(-) diff --git a/test/integration.js_10.snap b/test/integration.js_10.snap index ca7d0506..ad3a0e01 100644 --- a/test/integration.js_10.snap +++ b/test/integration.js_10.snap @@ -140,6 +140,29 @@ All files | 0 | 0 | 0 | 0 | " `; +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 @@ -152,24 +175,24 @@ hey --------------------------|---------|----------|---------|---------|-------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s --------------------------|---------|----------|---------|---------|-------------------------------- -All files | 73.96 | 59.75 | 62.5 | 73.96 | +All files | 73.37 | 59.03 | 62.5 | 73.37 | 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 | 77.19 | 54.38 | 72 | 77.19 | + lib | 77.88 | 54.38 | 72 | 77.88 | is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9 - parse-args.js | 96.8 | 58.33 | 100 | 96.8 | 142-143,151-152,165-166 + parse-args.js | 97.1 | 58.33 | 100 | 97.1 | 148-149,170-171,184-185 report.js | 75.31 | 58.33 | 78.57 | 75.31 | ...249,276-277,283-285,306-311 source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98 - lib/commands | 46.23 | 75 | 16.66 | 46.23 | - check-coverage.js | 21.31 | 100 | 0 | 21.31 | 9-11,14-27,30-44,46-61 - report.js | 93.75 | 71.42 | 50 | 93.75 | 9-10 + lib/commands | 41.28 | 66.66 | 16.66 | 41.28 | + check-coverage.js | 18.84 | 100 | 0 | 18.84 | 9-11,14-35,38-52,54-69 + report.js | 80 | 62.5 | 50 | 80 | 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 (73.96%) does not meet global threshold (101%) -ERROR: Coverage for branches (59.75%) does not meet global threshold (82%) -ERROR: Coverage for statements (73.96%) does not meet global threshold (95%) +,ERROR: Coverage for lines (73.37%) does not meet global threshold (101%) +ERROR: Coverage for branches (59.03%) does not meet global threshold (82%) +ERROR: Coverage for statements (73.37%) does not meet global threshold (95%) " `; @@ -177,15 +200,15 @@ 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 (21.31%) does not meet threshold (101%) for lib/commands/check-coverage.js -ERROR: Coverage for statements (21.31%) does not meet threshold (95%) for lib/commands/check-coverage.js -ERROR: Coverage for lines (93.75%) does not meet threshold (101%) for lib/commands/report.js -ERROR: Coverage for branches (71.42%) does not meet threshold (82%) for lib/commands/report.js -ERROR: Coverage for statements (93.75%) does not meet threshold (95%) for lib/commands/report.js +ERROR: Coverage for lines (18.84%) does not meet threshold (101%) for lib/commands/check-coverage.js +ERROR: Coverage for statements (18.84%) does not meet threshold (95%) for lib/commands/check-coverage.js +ERROR: Coverage for lines (80%) 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%) 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 (96.8%) does not meet threshold (101%) for lib/parse-args.js +ERROR: Coverage for lines (97.1%) 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 (75.31%) does not meet threshold (101%) for lib/report.js ERROR: Coverage for branches (58.33%) does not meet threshold (82%) for lib/report.js @@ -199,12 +222,20 @@ ERROR: Coverage for statements (75%) does not meet threshold (95%) for test/fixt " `; +exports[`c8 check-coverage check-coverage command with --100 1`] = ` +",,ERROR: Coverage for lines (77.22%) does not meet global threshold (100%) +ERROR: Coverage for functions (66.66%) does not meet global threshold (100%) +ERROR: Coverage for branches (62.35%) does not meet global threshold (100%) +ERROR: Coverage for statements (77.22%) 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 (73.96%) does not meet global threshold (101%) -ERROR: Coverage for branches (59.75%) does not meet global threshold (82%) -ERROR: Coverage for statements (73.96%) does not meet global threshold (95%) +",,ERROR: Coverage for lines (73.37%) does not meet global threshold (101%) +ERROR: Coverage for branches (59.03%) does not meet global threshold (82%) +ERROR: Coverage for statements (73.37%) does not meet global threshold (95%) " `; @@ -287,17 +318,17 @@ exports[`c8 report generates report from existing temporary files 1`] = ` ",--------------------------|---------|----------|---------|---------|-------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s --------------------------|---------|----------|---------|---------|-------------------------------- -All files | 73.96 | 59.75 | 62.5 | 73.96 | +All files | 73.37 | 59.03 | 62.5 | 73.37 | 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 | 77.19 | 54.38 | 72 | 77.19 | + lib | 77.88 | 54.38 | 72 | 77.88 | is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9 - parse-args.js | 96.8 | 58.33 | 100 | 96.8 | 142-143,151-152,165-166 + parse-args.js | 97.1 | 58.33 | 100 | 97.1 | 148-149,170-171,184-185 report.js | 75.31 | 58.33 | 78.57 | 75.31 | ...249,276-277,283-285,306-311 source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98 - lib/commands | 46.23 | 75 | 16.66 | 46.23 | - check-coverage.js | 21.31 | 100 | 0 | 21.31 | 9-11,14-27,30-44,46-61 - report.js | 93.75 | 71.42 | 50 | 93.75 | 9-10 + lib/commands | 41.28 | 66.66 | 16.66 | 41.28 | + check-coverage.js | 18.84 | 100 | 0 | 18.84 | 9-11,14-35,38-52,54-69 + report.js | 80 | 62.5 | 50 | 80 | 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 @@ -309,24 +340,24 @@ exports[`c8 report supports --check-coverage, when generating reports 1`] = ` ",--------------------------|---------|----------|---------|---------|-------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s --------------------------|---------|----------|---------|---------|-------------------------------- -All files | 73.96 | 59.75 | 62.5 | 73.96 | +All files | 73.37 | 59.03 | 62.5 | 73.37 | 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 | 77.19 | 54.38 | 72 | 77.19 | + lib | 77.88 | 54.38 | 72 | 77.88 | is-cjs-esm-bridge.js | 90 | 25 | 100 | 90 | 9 - parse-args.js | 96.8 | 58.33 | 100 | 96.8 | 142-143,151-152,165-166 + parse-args.js | 97.1 | 58.33 | 100 | 97.1 | 148-149,170-171,184-185 report.js | 75.31 | 58.33 | 78.57 | 75.31 | ...249,276-277,283-285,306-311 source-map-from-file.js | 45 | 100 | 0 | 45 | 39-50,52-67,69-77,81-98 - lib/commands | 46.23 | 75 | 16.66 | 46.23 | - check-coverage.js | 21.31 | 100 | 0 | 21.31 | 9-11,14-27,30-44,46-61 - report.js | 93.75 | 71.42 | 50 | 93.75 | 9-10 + lib/commands | 41.28 | 66.66 | 16.66 | 41.28 | + check-coverage.js | 18.84 | 100 | 0 | 18.84 | 9-11,14-35,38-52,54-69 + report.js | 80 | 62.5 | 50 | 80 | 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 (73.96%) does not meet global threshold (101%) -ERROR: Coverage for branches (59.75%) does not meet global threshold (82%) -ERROR: Coverage for statements (73.96%) does not meet global threshold (95%) +,ERROR: Coverage for lines (73.37%) does not meet global threshold (101%) +ERROR: Coverage for branches (59.03%) does not meet global threshold (82%) +ERROR: Coverage for statements (73.37%) does not meet global threshold (95%) " `;