From 63906454a78744bf3d70a38c899a2cb569d7c131 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Mon, 23 Mar 2020 14:45:21 -0700 Subject: [PATCH] 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. --- utils/testrunner/TestRunner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/testrunner/TestRunner.js b/utils/testrunner/TestRunner.js index 8730a623b0..1e3515d4a5 100644 --- a/utils/testrunner/TestRunner.js +++ b/utils/testrunner/TestRunner.js @@ -411,7 +411,7 @@ class TestPass { if (error) { if (error.stack) await this._runner._sourceMapSupport.rewriteStackTraceWithSourceMaps(error); - this._result.addError(message, error); + this._result.addError(message, error, this._workers.length === 1 ? this._workers[0] : null); } }