Skip to content

Instantly share code, notes, and snippets.

@mcknasty
Created January 18, 2024 00:52
Show Gist options
  • Save mcknasty/1693959f9a3bd9e4e6542ad4812656bb to your computer and use it in GitHub Desktop.
Save mcknasty/1693959f9a3bd9e4e6542ad4812656bb to your computer and use it in GitHub Desktop.
Cli Builds -- [ TimeStamp: 2024-01-17 19:52:23 195947214 ]
> c8@9.0.0 test
> cross-env TS_NODE_SKIP_PROJECT=true node ./bin/c8.js mocha --timeout=10000 ./test/*.js
c8
✔ reports coverage for script that exits normally (945ms)
✔ supports externally set NODE_V8_COVERAGE (923ms)
✔ merges reports from subprocesses together (355ms)
✔ allows relative files to be included (417ms)
✔ exits with 1 when report output fails (405ms)
✔ should allow for files outside of cwd (461ms)
✔ should allow for multiple overrides of src location for --all (401ms)
✔ cobertura report escapes special characters (356ms)
✔ collects coverage for script with shebang (393ms)
check-coverage
✔ exits with 0 if coverage within threshold (277ms)
✔ exits with 1 if coverage is below threshold (273ms)
✔ allows threshold to be applied on per-file basis (278ms)
✔ allows --check-coverage when executing script (792ms)
✔ --100 (737ms)
✔ check-coverage command with --100 (207ms)
report
✔ generates report from existing temporary files (215ms)
✔ supports --check-coverage, when generating reports (233ms)
ESM Modules
✔ collects coverage for ESM modules (302ms)
/* c8 ignore next */
✔ ignores lines with special comment (304ms)
✔ does not incorrectly mark previous branch as uncovered (see #254) (308ms)
/* c8 ignore start/stop */
✔ ignores lines with special comment (333ms)
source-maps
✔ does not attempt to load source map URLs that aren't (340ms)
TypeScript
✔ remaps branches (341ms)
✔ remaps classes (355ms)
UglifyJS
✔ remaps branches (2327ms)
✔ remaps classes (239ms)
nyc
✔ remaps branches (526ms)
✔ remaps classes (240ms)
rollup
✔ remaps branches (252ms)
✔ remaps classes (242ms)
ts-node
✔ reads source-map from cache, and applies to coverage (2274ms)
--all
✔ reports coverage for unloaded js files as 0 for line, branch and function (973ms)
✔ reports coverage for unloaded transpiled ts files as 0 for line, branch and function (845ms)
✔ reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node (3050ms)
✔ should allow for --all to be used in conjunction with --check-coverage (1038ms)
✔ should allow for --all to be used with the check-coverage command (2 invocations) (1900ms)
report
✔ supports reporting on directories outside cwd (301ms)
✔ supports reporting on single directories outside cwd (203ms)
--exclude-after-remap
✔ applies exclude rules after source-maps are applied (314ms)
--extension
✔ includes coverage when extensions specified (881ms)
✔ includes coverage when extensions specified with --all (1025ms)
c8 mergeAsync
✔ reports coverage for script that exits normally (799ms)
✔ supports externally set NODE_V8_COVERAGE (742ms)
✔ merges reports from subprocesses together (384ms)
✔ allows relative files to be included (514ms)
✔ exits with 1 when report output fails (859ms)
✔ should allow for files outside of cwd (368ms)
✔ should allow for multiple overrides of src location for --all (385ms)
✔ cobertura report escapes special characters (330ms)
✔ collects coverage for script with shebang (344ms)
check-coverage
✔ exits with 0 if coverage within threshold (279ms)
✔ exits with 1 if coverage is below threshold (309ms)
✔ allows threshold to be applied on per-file basis (774ms)
✔ allows --check-coverage when executing script (753ms)
✔ --100 (748ms)
✔ check-coverage command with --100 (220ms)
report
✔ generates report from existing temporary files (267ms)
✔ supports --check-coverage, when generating reports (659ms)
ESM Modules
✔ collects coverage for ESM modules (580ms)
/* c8 ignore next */
✔ ignores lines with special comment (635ms)
✔ does not incorrectly mark previous branch as uncovered (see #254) (336ms)
/* c8 ignore start/stop */
✔ ignores lines with special comment (369ms)
source-maps
✔ does not attempt to load source map URLs that aren't (404ms)
TypeScript
✔ remaps branches (407ms)
✔ remaps classes (386ms)
UglifyJS
✔ remaps branches (368ms)
✔ remaps classes (928ms)
nyc
✔ remaps branches (262ms)
✔ remaps classes (289ms)
rollup
✔ remaps branches (388ms)
✔ remaps classes (418ms)
ts-node
✔ reads source-map from cache, and applies to coverage (2942ms)
--all
✔ reports coverage for unloaded js files as 0 for line, branch and function (895ms)
✔ reports coverage for unloaded transpiled ts files as 0 for line, branch and function (878ms)
✔ reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node (3006ms)
✔ should allow for --all to be used in conjunction with --check-coverage (933ms)
✔ should allow for --all to be used with the check-coverage command (2 invocations) (1765ms)
report
✔ supports reporting on directories outside cwd (185ms)
✔ supports reporting on single directories outside cwd (177ms)
--exclude-after-remap
✔ applies exclude rules after source-maps are applied (337ms)
--extension
✔ includes coverage when extensions specified (825ms)
✔ includes coverage when extensions specified with --all (1032ms)
parse-args
hideInstrumenteeArgs
✔ hides arguments passed to instrumented app
hideInstrumenterArgs
✔ hides arguments passed to c8 bin (45ms)
with NODE_V8_COVERAGE already set
✔ should not override it
--config
✔ should resolve to .nycrc at cwd
✔ should use config file specified in --config
✔ should have -c as an alias
✔ should respect options on the command line over config file
✔ should allow config files to extend each other
--merge-async
✔ should default to false
✔ should set to true when flag exists
Help Message
✔ ensure the help message is correct (223ms)
✔ ensure 'not enough non-option arguments' warning message (226ms)
Print derived configuration CLI option
✔ should not demand any arguments: --print-config=true (250ms)
✔ should not demand any arguments: --print-config (368ms)
✔ should demand arguments: --print-config=false (268ms)
✔ should not demand arguments: --print-config=false (959ms)
✔ ensure valid json (256ms)
- ensure comma delimited values transform into an array
✔ ensure default project configuration file is loaded (218ms)
text format option
✔ ensure loads config file from cli (214ms)
✔ ensure loads reporter option from cli (212ms)
json format option
✔ ensure loads config file from cli (212ms)
✔ ensure loads reporter option from cli (210ms)
source-map-from-file
✔ should parse source maps from compiled targets
✔ should handle extra whitespace characters
✔ should support base64 encoded inline source maps
107 passing (1m)
1 pending
--------------------------|---------|----------|---------|---------|--------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------------|---------|----------|---------|---------|--------------------------------
All files | 97.38 | 91.35 | 100 | 97.38 |
bin | 95.34 | 100 | 100 | 95.34 |
c8.js | 95.34 | 100 | 100 | 95.34 | 41-42
lib | 97.15 | 90.15 | 100 | 97.15 |
parse-args.js | 98.4 | 94 | 100 | 98.4 | 174-175,242-243,276-277
report.js | 97.51 | 91.17 | 100 | 97.51 | ...121,233-234,317-318,352-354
source-map-from-file.js | 91 | 71.42 | 100 | 91 | 74-76,91-93,95-97
lib/commands | 100 | 95.45 | 100 | 100 |
check-coverage.js | 100 | 92.85 | 100 | 100 | 26
report.js | 100 | 100 | 100 | 100 |
--------------------------|---------|----------|---------|---------|--------------------------------
> c8@9.0.0 posttest
> standard
> c8@9.0.0 test
> cross-env TS_NODE_SKIP_PROJECT=true node ./bin/c8.js mocha --timeout=10000 ./test/*.js
c8
✔ reports coverage for script that exits normally (844ms)
✔ supports externally set NODE_V8_COVERAGE (750ms)
✔ merges reports from subprocesses together (397ms)
✔ allows relative files to be included (488ms)
✔ exits with 1 when report output fails (448ms)
✔ should allow for files outside of cwd (348ms)
✔ should allow for multiple overrides of src location for --all (376ms)
✔ cobertura report escapes special characters (357ms)
✔ collects coverage for script with shebang (353ms)
check-coverage
✔ exits with 0 if coverage within threshold (236ms)
✔ exits with 1 if coverage is below threshold (250ms)
✔ allows threshold to be applied on per-file basis (265ms)
✔ allows --check-coverage when executing script (794ms)
✔ --100 (738ms)
✔ check-coverage command with --100 (209ms)
report
✔ generates report from existing temporary files (241ms)
✔ supports --check-coverage, when generating reports (227ms)
ESM Modules
✔ collects coverage for ESM modules (291ms)
/* c8 ignore next */
✔ ignores lines with special comment (293ms)
✔ does not incorrectly mark previous branch as uncovered (see #254) (387ms)
/* c8 ignore start/stop */
✔ ignores lines with special comment (360ms)
source-maps
✔ does not attempt to load source map URLs that aren't (318ms)
TypeScript
✔ remaps branches (375ms)
✔ remaps classes (354ms)
UglifyJS
✔ remaps branches (387ms)
✔ remaps classes (374ms)
nyc
✔ remaps branches (389ms)
✔ remaps classes (408ms)
rollup
✔ remaps branches (359ms)
✔ remaps classes (384ms)
ts-node
✔ reads source-map from cache, and applies to coverage (2668ms)
--all
✔ reports coverage for unloaded js files as 0 for line, branch and function (916ms)
✔ reports coverage for unloaded transpiled ts files as 0 for line, branch and function (855ms)
✔ reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node (2891ms)
✔ should allow for --all to be used in conjunction with --check-coverage (1043ms)
✔ should allow for --all to be used with the check-coverage command (2 invocations) (2192ms)
report
✔ supports reporting on directories outside cwd (184ms)
✔ supports reporting on single directories outside cwd (184ms)
--exclude-after-remap
✔ applies exclude rules after source-maps are applied (341ms)
--extension
✔ includes coverage when extensions specified (807ms)
✔ includes coverage when extensions specified with --all (993ms)
c8 mergeAsync
✔ reports coverage for script that exits normally (750ms)
✔ supports externally set NODE_V8_COVERAGE (739ms)
✔ merges reports from subprocesses together (345ms)
✔ allows relative files to be included (427ms)
✔ exits with 1 when report output fails (720ms)
✔ should allow for files outside of cwd (323ms)
✔ should allow for multiple overrides of src location for --all (360ms)
✔ cobertura report escapes special characters (332ms)
✔ collects coverage for script with shebang (380ms)
check-coverage
✔ exits with 0 if coverage within threshold (228ms)
✔ exits with 1 if coverage is below threshold (257ms)
✔ allows threshold to be applied on per-file basis (314ms)
✔ allows --check-coverage when executing script (837ms)
✔ --100 (748ms)
✔ check-coverage command with --100 (221ms)
report
✔ generates report from existing temporary files (219ms)
✔ supports --check-coverage, when generating reports (233ms)
ESM Modules
✔ collects coverage for ESM modules (299ms)
/* c8 ignore next */
✔ ignores lines with special comment (307ms)
✔ does not incorrectly mark previous branch as uncovered (see #254) (281ms)
/* c8 ignore start/stop */
✔ ignores lines with special comment (328ms)
source-maps
✔ does not attempt to load source map URLs that aren't (300ms)
TypeScript
✔ remaps branches (343ms)
✔ remaps classes (365ms)
UglifyJS
✔ remaps branches (357ms)
✔ remaps classes (391ms)
nyc
✔ remaps branches (407ms)
✔ remaps classes (381ms)
rollup
✔ remaps branches (373ms)
✔ remaps classes (417ms)
ts-node
✔ reads source-map from cache, and applies to coverage (2732ms)
--all
✔ reports coverage for unloaded js files as 0 for line, branch and function (1010ms)
✔ reports coverage for unloaded transpiled ts files as 0 for line, branch and function (890ms)
✔ reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node (3133ms)
✔ should allow for --all to be used in conjunction with --check-coverage (937ms)
✔ should allow for --all to be used with the check-coverage command (2 invocations) (1737ms)
report
✔ supports reporting on directories outside cwd (181ms)
✔ supports reporting on single directories outside cwd (169ms)
--exclude-after-remap
✔ applies exclude rules after source-maps are applied (322ms)
--extension
✔ includes coverage when extensions specified (797ms)
✔ includes coverage when extensions specified with --all (1002ms)
parse-args
hideInstrumenteeArgs
✔ hides arguments passed to instrumented app
hideInstrumenterArgs
✔ hides arguments passed to c8 bin
with NODE_V8_COVERAGE already set
✔ should not override it
--config
✔ should resolve to .nycrc at cwd
✔ should use config file specified in --config
✔ should have -c as an alias
✔ should respect options on the command line over config file
✔ should allow config files to extend each other
--merge-async
✔ should default to false
✔ should set to true when flag exists
Help Message
1) ensure the help message is correct
2) ensure 'not enough non-option arguments' warning message
Print derived configuration CLI option
✔ should not demand any arguments: --print-config=true (190ms)
✔ should not demand any arguments: --print-config (190ms)
✔ should demand arguments: --print-config=false (222ms)
✔ should not demand arguments: --print-config=false (1014ms)
✔ ensure valid json (191ms)
- ensure comma delimited values transform into an array
✔ ensure default project configuration file is loaded (187ms)
text format option
✔ ensure loads config file from cli (189ms)
✔ ensure loads reporter option from cli (190ms)
json format option
✔ ensure loads config file from cli (195ms)
✔ ensure loads reporter option from cli (287ms)
source-map-from-file
✔ should parse source maps from compiled targets
✔ should handle extra whitespace characters
✔ should support base64 encoded inline source maps
105 passing (57s)
1 pending
2 failing
1) Help Message
ensure the help message is correct:
AssertionError: expected value to match snapshot Help Message ensure the help message is correct 1
+ expected - actual
(i.e. **/node_modules/**) by default
[boolean] [default: true]
--temp-directory directory V8 coverage data is written to and read
from
- [default: "./coverage/tmp"]
+ [default: "/home/tmckeown/codez/github/c8/coverage/tmp"]
--clean should temp files be deleted before script
execution [boolean] [default: true]
--resolve resolve paths to alternate base directory
[default: ""]
at Context.<anonymous> (test/print-config.js:35:19)
at process.processImmediate (node:internal/timers:476:21)
2) Help Message
ensure 'not enough non-option arguments' warning message:
AssertionError: expected value to match snapshot Help Message ensure 'not enough non-option arguments' warning message 1
+ expected - actual
(i.e. **/node_modules/**) by default
[boolean] [default: true]
--temp-directory directory V8 coverage data is written to and read
from
- [default: "./coverage/tmp"]
+ [default: "/home/tmckeown/codez/github/c8/coverage/tmp"]
--clean should temp files be deleted before script
execution [boolean] [default: true]
--resolve resolve paths to alternate base directory
[default: ""]
at Context.<anonymous> (test/print-config.js:47:19)
at process.processImmediate (node:internal/timers:476:21)
--------------------------|---------|----------|---------|---------|--------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------------|---------|----------|---------|---------|--------------------------------
All files | 97.38 | 91.35 | 100 | 97.38 |
bin | 95.34 | 100 | 100 | 95.34 |
c8.js | 95.34 | 100 | 100 | 95.34 | 41-42
lib | 97.15 | 90.15 | 100 | 97.15 |
parse-args.js | 98.4 | 94 | 100 | 98.4 | 174-175,242-243,276-277
report.js | 97.51 | 91.17 | 100 | 97.51 | ...121,233-234,317-318,352-354
source-map-from-file.js | 91 | 71.42 | 100 | 91 | 74-76,91-93,95-97
lib/commands | 100 | 95.45 | 100 | 100 |
check-coverage.js | 100 | 92.85 | 100 | 100 | 26
report.js | 100 | 100 | 100 | 100 |
--------------------------|---------|----------|---------|---------|--------------------------------
> c8@9.0.0 test:snap
> cross-env CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test
> c8@9.0.0 test
> cross-env TS_NODE_SKIP_PROJECT=true node ./bin/c8.js mocha --timeout=10000 ./test/*.js
c8
✔ reports coverage for script that exits normally (836ms)
✔ supports externally set NODE_V8_COVERAGE (746ms)
✔ merges reports from subprocesses together (385ms)
✔ allows relative files to be included (468ms)
✔ exits with 1 when report output fails (453ms)
✔ should allow for files outside of cwd (345ms)
✔ should allow for multiple overrides of src location for --all (358ms)
✔ cobertura report escapes special characters (314ms)
✔ collects coverage for script with shebang (335ms)
check-coverage
✔ exits with 0 if coverage within threshold (327ms)
✔ exits with 1 if coverage is below threshold (306ms)
✔ allows threshold to be applied on per-file basis (296ms)
✔ allows --check-coverage when executing script (806ms)
✔ --100 (742ms)
✔ check-coverage command with --100 (221ms)
report
✔ generates report from existing temporary files (230ms)
✔ supports --check-coverage, when generating reports (256ms)
ESM Modules
✔ collects coverage for ESM modules (369ms)
/* c8 ignore next */
✔ ignores lines with special comment (310ms)
✔ does not incorrectly mark previous branch as uncovered (see #254) (305ms)
/* c8 ignore start/stop */
✔ ignores lines with special comment (332ms)
source-maps
✔ does not attempt to load source map URLs that aren't (305ms)
TypeScript
✔ remaps branches (361ms)
✔ remaps classes (356ms)
UglifyJS
✔ remaps branches (377ms)
✔ remaps classes (368ms)
nyc
✔ remaps branches (387ms)
✔ remaps classes (454ms)
rollup
✔ remaps branches (691ms)
✔ remaps classes (562ms)
ts-node
✔ reads source-map from cache, and applies to coverage (2649ms)
--all
✔ reports coverage for unloaded js files as 0 for line, branch and function (944ms)
✔ reports coverage for unloaded transpiled ts files as 0 for line, branch and function (835ms)
✔ reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node (3061ms)
✔ should allow for --all to be used in conjunction with --check-coverage (942ms)
✔ should allow for --all to be used with the check-coverage command (2 invocations) (1751ms)
report
✔ supports reporting on directories outside cwd (177ms)
✔ supports reporting on single directories outside cwd (169ms)
--exclude-after-remap
✔ applies exclude rules after source-maps are applied (323ms)
--extension
✔ includes coverage when extensions specified (795ms)
✔ includes coverage when extensions specified with --all (1001ms)
c8 mergeAsync
✔ reports coverage for script that exits normally (751ms)
✔ supports externally set NODE_V8_COVERAGE (717ms)
✔ merges reports from subprocesses together (349ms)
✔ allows relative files to be included (438ms)
✔ exits with 1 when report output fails (770ms)
✔ should allow for files outside of cwd (342ms)
✔ should allow for multiple overrides of src location for --all (367ms)
✔ cobertura report escapes special characters (320ms)
✔ collects coverage for script with shebang (331ms)
check-coverage
✔ exits with 0 if coverage within threshold (220ms)
✔ exits with 1 if coverage is below threshold (243ms)
✔ allows threshold to be applied on per-file basis (264ms)
✔ allows --check-coverage when executing script (789ms)
✔ --100 (739ms)
✔ check-coverage command with --100 (203ms)
report
✔ generates report from existing temporary files (217ms)
✔ supports --check-coverage, when generating reports (260ms)
ESM Modules
✔ collects coverage for ESM modules (296ms)
/* c8 ignore next */
✔ ignores lines with special comment (299ms)
✔ does not incorrectly mark previous branch as uncovered (see #254) (287ms)
/* c8 ignore start/stop */
✔ ignores lines with special comment (329ms)
source-maps
✔ does not attempt to load source map URLs that aren't (299ms)
TypeScript
✔ remaps branches (328ms)
✔ remaps classes (363ms)
UglifyJS
✔ remaps branches (348ms)
✔ remaps classes (360ms)
nyc
✔ remaps branches (363ms)
✔ remaps classes (394ms)
rollup
✔ remaps branches (367ms)
✔ remaps classes (357ms)
ts-node
✔ reads source-map from cache, and applies to coverage (2470ms)
--all
✔ reports coverage for unloaded js files as 0 for line, branch and function (980ms)
✔ reports coverage for unloaded transpiled ts files as 0 for line, branch and function (875ms)
✔ reports coverage for unloaded ts files as 0 for line, branch and function when using ts-node (2925ms)
✔ should allow for --all to be used in conjunction with --check-coverage (878ms)
✔ should allow for --all to be used with the check-coverage command (2 invocations) (1818ms)
report
✔ supports reporting on directories outside cwd (190ms)
✔ supports reporting on single directories outside cwd (184ms)
--exclude-after-remap
✔ applies exclude rules after source-maps are applied (343ms)
--extension
✔ includes coverage when extensions specified (912ms)
✔ includes coverage when extensions specified with --all (1125ms)
parse-args
hideInstrumenteeArgs
✔ hides arguments passed to instrumented app
hideInstrumenterArgs
✔ hides arguments passed to c8 bin (50ms)
with NODE_V8_COVERAGE already set
✔ should not override it
--config
✔ should resolve to .nycrc at cwd
✔ should use config file specified in --config
✔ should have -c as an alias
✔ should respect options on the command line over config file
✔ should allow config files to extend each other
--merge-async
✔ should default to false
✔ should set to true when flag exists
Help Message
✔ ensure the help message is correct (233ms)
✔ ensure 'not enough non-option arguments' warning message (237ms)
Print derived configuration CLI option
✔ should not demand any arguments: --print-config=true (219ms)
✔ should not demand any arguments: --print-config (216ms)
✔ should demand arguments: --print-config=false (231ms)
✔ should not demand arguments: --print-config=false (873ms)
✔ ensure valid json (209ms)
- ensure comma delimited values transform into an array
✔ ensure default project configuration file is loaded (205ms)
text format option
✔ ensure loads config file from cli (201ms)
✔ ensure loads reporter option from cli (211ms)
json format option
✔ ensure loads config file from cli (202ms)
✔ ensure loads reporter option from cli (199ms)
source-map-from-file
✔ should parse source maps from compiled targets
✔ should handle extra whitespace characters
✔ should support base64 encoded inline source maps
107 passing (56s)
1 pending
--------------------------|---------|----------|---------|---------|--------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------------|---------|----------|---------|---------|--------------------------------
All files | 97.38 | 91.35 | 100 | 97.38 |
bin | 95.34 | 100 | 100 | 95.34 |
c8.js | 95.34 | 100 | 100 | 95.34 | 41-42
lib | 97.15 | 90.15 | 100 | 97.15 |
parse-args.js | 98.4 | 94 | 100 | 98.4 | 174-175,242-243,276-277
report.js | 97.51 | 91.17 | 100 | 97.51 | ...121,233-234,317-318,352-354
source-map-from-file.js | 91 | 71.42 | 100 | 91 | 74-76,91-93,95-97
lib/commands | 100 | 95.45 | 100 | 100 |
check-coverage.js | 100 | 92.85 | 100 | 100 | 26
report.js | 100 | 100 | 100 | 100 |
--------------------------|---------|----------|---------|---------|--------------------------------
> c8@9.0.0 posttest
> standard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment