diff --git a/lib/report/common/defaults.js b/lib/report/common/defaults.js index 9c7d7881..fae736fe 100644 --- a/lib/report/common/defaults.js +++ b/lib/report/common/defaults.js @@ -25,11 +25,12 @@ module.exports = { colorize: function (str, clazz) { /* istanbul ignore if: untestable in batch mode */ if (supportsColor) { - switch (clazz) { - 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; - } + var colors = { + low: '31;1', + medium: '33;1', + high: '32;1' + }; + return '\u001b[' + colors[clazz] + 'm' + str + '\u001b[0m'; } return str; },