mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
fix(testrunner): fix stack formatting
This commit is contained in:
parent
0d7701c730
commit
5d47a38c18
@ -181,7 +181,9 @@ class Reporter {
|
|||||||
return stack;
|
return stack;
|
||||||
const line = lines[index];
|
const line = lines[index];
|
||||||
const fromIndex = line.lastIndexOf(this._projectFolder) + this._projectFolder.length;
|
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);
|
lines[index] = line.substring(0, fromIndex) + YELLOW_COLOR + line.substring(fromIndex, toIndex) + RESET_COLOR + line.substring(toIndex);
|
||||||
return lines.join('\n');
|
return lines.join('\n');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user