`istanbul cover` hiding errors with octal literals
When running invalid Javascript through Istanbul, it is converting potentially unsupported numeric encodings (e.g. 0o1234 pre-ES2015) into decimal and hiding actual errors.
The npm module yazl has been passing it's Travis/Istanbul tests for years on Node v0.10.48, despite having ES2015-only octal literals in the code.
This line of code:
console.log(0o1234);
When run on Node v0.10.48 gives SyntaxError: Unexpected token ILLEGAL, but when sent through istanbul instrument I see this output:
__cov_iCMg9NRFTwMrHhpLiqgjqg.s['1']++;console.log(668);
Which suddenly has become valid Javascript, despite the original source not being such.
Pretty minor (I've recommended the YAZL author simply drop "support" for Node v0.10.48, since the module has not actually ran on that platform for many years), but was quite the head-scratcher to track down why an octal literal in the module was "ok" but was failing when used in the unit tests!