fix(testrunner): fix stack formatting

This commit is contained in:
Andrey Lushnikov 2019-12-18 13:55:17 -08:00
parent 0d7701c730
commit 5d47a38c18

View File

@ -181,7 +181,9 @@ class Reporter {
return stack;
const line = lines[index];
const fromIndex = line.lastIndexOf(this._projectFolder) + this._projectFolder.length;
const toIndex = line.lastIndexOf(')');
let toIndex = line.lastIndexOf(')');
if (toIndex === -1)
toIndex = line.length;
lines[index] = line.substring(0, fromIndex) + YELLOW_COLOR + line.substring(fromIndex, toIndex) + RESET_COLOR + line.substring(toIndex);
return lines.join('\n');
}