Make tests pass on Windows
This commit is contained in:
parent
6b49aad296
commit
481de663ac
|
|
@ -36,9 +36,9 @@ function formatStack(indent, stack) {
|
||||||
stack = stack.split('\\n').filter(s => s.startsWith(' at '));
|
stack = stack.split('\\n').filter(s => s.startsWith(' at '));
|
||||||
stack = stack.map(s => {
|
stack = stack.map(s => {
|
||||||
const match = /^( at.* )\\(?([^ )]+)\\)?/.exec(s);
|
const match = /^( at.* )\\(?([^ )]+)\\)?/.exec(s);
|
||||||
const location = match[2].split(':');
|
let location = match[2];
|
||||||
location[0] = path.basename(location[0]);
|
location = location.substring(location.lastIndexOf(path.sep) + 1);
|
||||||
return ' at ' + location.join(':');
|
return ' at ' + location;
|
||||||
});
|
});
|
||||||
return indent + stack.join('\\n' + indent);
|
return indent + stack.join('\\n' + indent);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue