From f8618d4701cdc3d29e246cba73da1d197d9178eb Mon Sep 17 00:00:00 2001 From: Ivailo Petrov <5092875+ivailop@users.noreply.github.com> Date: Tue, 15 Aug 2023 02:18:15 -0700 Subject: [PATCH] do not report 'testExecError' if 'noResults' --- utils/buildJsonResults.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/buildJsonResults.js b/utils/buildJsonResults.js index 46d2378..d0e0f3e 100644 --- a/utils/buildJsonResults.js +++ b/utils/buildJsonResults.js @@ -280,7 +280,7 @@ module.exports = function (report, appDirectory, options, rootDir = null) { // We have all tests passed but a failure in a test hook like in the `beforeAll` method // Make sure we log them since Jest still reports the suite as failed - if (suite.testExecError != null) { + if (!noResults && suite.testExecError != null) { const fakeTC = { status: testFailureStatus, failureMessages: [JSON.stringify(suite.testExecError)],