Skip to content
TimothyGuPublic
forked from bcoe/c8

About

collect test coverage using v8's inspector

Resources

Stars

1 star

Watchers

1 watching

Forks

 
 

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

c8 - native v8 code-coverage

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

Like nyc, c8 just magically works, simply:

npm i c8 -g
c8 node foo.js

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

TODO:

  • 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:

About

collect test coverage using v8's inspector

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages