Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
CR
  • Loading branch information
MoLow committed Nov 6, 2022
commit 5880f19d59b85c74945929c04954e6b6c770210a
6 changes: 2 additions & 4 deletions lib/internal/test_runner/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,7 @@ class Test extends AsyncResource {
await afterEach();
this.pass();
} catch (err) {
// eslint-disable-next-line no-empty
try { await afterEach(); } catch {}
try { await afterEach(); } catch { /* test is already failing, let's the error */ }
if (isTestFailureError(err)) {
if (err.failureType === kTestTimeoutFailure) {
this.cancel(err);
Expand Down Expand Up @@ -768,8 +767,7 @@ class Suite extends Test {

this.pass();
} catch (err) {
// eslint-disable-next-line no-empty
try { await afterEach(); } catch {}
try { await afterEach(); } catch { /* test is already failing, let's the error */ }
if (isTestFailureError(err)) {
this.fail(err);
} else {
Expand Down