From 6e24065b8ff1faf2e43937f386a5e7677ce7d8c4 Mon Sep 17 00:00:00 2001 From: Andreas Weber Date: Sun, 3 Nov 2024 11:51:45 +0100 Subject: [PATCH] feat: revert testUtils test change --- src/utils/testUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/testUtils.ts b/src/utils/testUtils.ts index 96ddc47b..745e041a 100644 --- a/src/utils/testUtils.ts +++ b/src/utils/testUtils.ts @@ -31,7 +31,7 @@ export function testFactoryAsync( try { await testMethod(testResult); } catch (err) { - setErrorInTestResult(testResult, err, TestResultStatus.ERROR); + setErrorInTestResult(testResult, err); if (options.ignoreErrorFile && testResult.error?.errorType) { testResult.error.displayMessage = `${testResult.error.errorType}: ${testResult.error.message}`; } @@ -41,8 +41,8 @@ export function testFactoryAsync( }; } -function setErrorInTestResult(testResult: TestResult, err: unknown, status = TestResultStatus.FAILED) { - testResult.status = status; +function setErrorInTestResult(testResult: TestResult, err: unknown) { + testResult.status = TestResultStatus.FAILED; if (isError(err)) { testResult.error = parseError(err); } else {