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)],