A historical reference guide for JSCoverage, an early tool used to instrument JavaScript files to track test code coverage.
Archived note: Modern JavaScript projects use c8 (native V8 coverage) or Istanbul / nyc.
Instrumenting Source Code
jscoverage lib/ lib-cov/
Running Tests with Coverage
// Test entry point checks for coverage-instrumented directory
const mylib = process.env.COVERAGE
? require('./lib-cov/mylib')
: require('./lib/mylib');