You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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!
The text was updated successfully, but these errors were encountered:
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:
When run on Node v0.10.48 gives
SyntaxError: Unexpected token ILLEGAL
, but when sent throughistanbul instrument
I see this output: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!
The text was updated successfully, but these errors were encountered: