fix(testrunner): sourcemapify stack traces for test errors (#1409)
Fixes #1403
This commit is contained in:
parent
edd2fee943
commit
a9ab9b0dc0
|
|
@ -253,6 +253,8 @@ class TestWorker {
|
||||||
await this._testPass._willStartTestBody(this, test);
|
await this._testPass._willStartTestBody(this, test);
|
||||||
this._runningTestCallback = test._userCallback;
|
this._runningTestCallback = test._userCallback;
|
||||||
test.error = await test._userCallback.run(this._state, test);
|
test.error = await test._userCallback.run(this._state, test);
|
||||||
|
if (test.error && test.error.stack)
|
||||||
|
await this._testPass._runner._sourceMapSupport.rewriteStackTraceWithSourceMaps(test.error);
|
||||||
this._runningTestCallback = null;
|
this._runningTestCallback = null;
|
||||||
if (!test.error)
|
if (!test.error)
|
||||||
test.result = TestResult.Ok;
|
test.result = TestResult.Ok;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue