fix(testrunner): sourcemapify stack traces for test errors (#1409)

Fixes #1403
This commit is contained in:
Andrey Lushnikov 2020-03-17 09:04:44 -07:00 committed by GitHub
parent edd2fee943
commit a9ab9b0dc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,6 +253,8 @@ class TestWorker {
await this._testPass._willStartTestBody(this, test);
this._runningTestCallback = test._userCallback;
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;
if (!test.error)
test.result = TestResult.Ok;