Skip to content

Commit

Permalink
Prevent babel strict mode error due to strings
Browse files Browse the repository at this point in the history
```
SyntaxError: istanbul/lib/report/html.js: lib/report/common/defaults.js: Octal literal in strict mode (29:36)
```

This can be reproduced if babel-core/register is loaded and excludes are not configured properly to ignore istanbul.
  • Loading branch information
kpdecker committed Nov 13, 2015
1 parent d1a602d commit b7b66c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/report/common/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ module.exports = {
/* istanbul ignore if: untestable in batch mode */
if (supportsColor) {
switch (clazz) {
case 'low' : str = '\033[91m' + str + '\033[0m'; break;
case 'medium': str = '\033[93m' + str + '\033[0m'; break;
case 'high': str = '\033[92m' + str + '\033[0m'; break;
case 'low' : str = '\x1B[91m' + str + '\x1B[0m'; break;
case 'medium': str = '\x1B[93m' + str + '\x1B[0m'; break;
case 'high': str = '\x1B[92m' + str + '\x1B[0m'; break;
}
}
return str;
Expand Down

0 comments on commit b7b66c5

Please sign in to comment.