JSPM

  • Created
  • Published
  • Downloads 2518962
  • Score
    100M100P100Q197933F
  • License ISC

collect test coverage using v8's inspector

Package Exports

  • c8/bin/c8.js
  • c8/lib/report
  • c8/lib/report.js
  • c8/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (c8) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

c8 - native v8 code-coverage

Code-coverage using v8's Inspector that's compatible with Istanbul's reporters.

Like nyc, c8 just magically works:

npm i c8 -g
c8 node foo.js

The above example will collect coverage for foo.js using v8's inspector.

remaining work

  • write logic for converting v8 coverage output to Istanbul Coverage.json format.

  • talk to node.js project about silencing messages:

    Debugger listening on ws://127.0.0.1:56399/e850110a-c5df-41d8-8ef2-400f6829617f.

  • figure out why detailed mode does not appear to be working.

    • this is fixed in v8, as long as you start with --inspect-brk you can collect coverage in detailed mode.
  • figure out a better way to determine that all processes in event loop have terminated (except the inspector session).

  • process.exit() can't perform an async operation; how can we track coverage for scripts that exit?

    • we can now listen for the Runtime.executionContextDestroyed event.
  • figure out why instrumentation of .mjs files does not work: