Generate a color-coded HTML report showing which lines of code your tests cover.
Measure branch coverage to confirm that both sides of every if-else are exercised.
Export lcov-format coverage data to integrate with a CI tool or third-party dashboard.
This repository is archived, use the current istanbuljs packages at github.com/istanbuljs instead.
Istanbul is a JavaScript code coverage tool, which means it measures how much of your code is actually executed when you run your tests. When you write tests for a program, you might think they check everything, but in practice some lines or branches of code may never get touched during the test run. Istanbul instruments your code (adds tracking logic behind the scenes) and then produces a report showing exactly which statements, functions, and branches were run and which were not. This repository is archived and has been inactive for seven years. The README clearly states that this version is deprecated and directs users to the actively maintained replacement at the istanbuljs organization on GitHub and at istanbul.js.org. New projects should go there rather than use this version. For historical context, the original Istanbul worked by wrapping your node test command with a single prefix: instead of running your test file directly, you ran it under istanbul cover, and Istanbul would produce a coverage folder containing a JSON data file, an lcov file for tools that accept that format, and an HTML report you could open in a browser. The HTML report highlighted each source file and colored the covered lines green and the uncovered lines red. It supported statement coverage (was this line reached), branch coverage (when there was an if-else, was both the true and false path exercised), and function coverage (was this function ever called). It could also be used as a library from within other JavaScript tools, not just as a standalone command. Again, if you are looking to add coverage to a JavaScript project today, use the current istanbuljs packages rather than this archived repository. This repo is preserved for reference only.
← gotwarlost on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.