fix(testrunner): attribute unhandle promise reject to a single worker (#1491)
When there is a single worker, we are almost sure the error originated in that worker. Attributing it helps with context by showing last run tests.
This commit is contained in:
parent
de0a2d1081
commit
63906454a7
|
|
@ -411,7 +411,7 @@ class TestPass {
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error.stack)
|
if (error.stack)
|
||||||
await this._runner._sourceMapSupport.rewriteStackTraceWithSourceMaps(error);
|
await this._runner._sourceMapSupport.rewriteStackTraceWithSourceMaps(error);
|
||||||
this._result.addError(message, error);
|
this._result.addError(message, error, this._workers.length === 1 ? this._workers[0] : null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue