Skip to content

Commit

Permalink
feat: revert testUtils test change
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Nov 3, 2024
1 parent e8851dc commit 6e24065
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
Expand All @@ -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 {
Expand Down

0 comments on commit 6e24065

Please sign in to comment.