Closed GerHobbelt closed 6 years ago
Related matter: https://github.com/gotwarlost/istanbul/issues/856
Fixed since today's release 0.6.1-215. All tests and examples behave the same when executed the normal way or when run via nyc
.
jison
make
now includes all-around code coverage analysis near the end of the build phase; the compound/summary report ends up in the /coverage/lcov-report/ directory as per nyc/istanbul default.
Code instrumentation for coverage analysis causes the generated parsers/lexers/misc code to fail, hence the mocha test suits fail dramatically when run under istanbul/nyc code coverage.
Guess: This is probably related to #7 as this is yet another code rewriting issue with the jison tool itself. Trouble is very probably due to code being stringified, then edited, then fed back into
eval()
/new Function()
/similar 'live' code generation constructs.Use https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md as a hint list too as the jison core should be 'text-rather-than-code' fixed, while unit tests injecting action code as JavaScript functions, etc. can be nudged into cooperation by using the
/* istanbul ignore ... */
marker documented in the URL https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md .