Convert non-standard octal escape sequences to hex in test runner

This commit is contained in:
Dan Stillman 2017-05-24 01:12:05 -04:00
parent aa321f3495
commit 1e459287de

View file

@ -141,9 +141,9 @@ function Reporter(runner) {
let indentStr = indent();
dump("\r" + indentStr
// Dark red X for errors
+ "\033[31;40m" + Mocha.reporters.Base.symbols.err + " [FAIL]\033[0m"
+ "\x1B[31;40m" + Mocha.reporters.Base.symbols.err + " [FAIL]\x1B[0m"
// Trigger bell if interactive
+ (Zotero.automatedTest ? "" : "\007")
+ (Zotero.automatedTest ? "" : "\x07")
+ " " + test.title + "\n"
+ indentStr + " " + err.toString() + " at\n"
+ err.stack.replace(/^/gm, indentStr + " "));