Skip to content

Commit

Permalink
test_runner: remove redundant report call
Browse files Browse the repository at this point in the history
This commit removes a redundant call to `reportStarted()`. It is
redundant because a few lines down, `subtest.finalize()` is
called. `finalize()` will find the first test that is ready to
report its data, and then call `report()`, which also calls
`reportStarted()`. This will trigger the `'test:start'` as high
up the test tree as necessary.

PR-URL: #52089
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Raz Luvaton <[email protected]>
  • Loading branch information
cjihrig authored and marco-ippolito committed May 3, 2024
1 parent f8362b0 commit 73b38bf
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/internal/test_runner/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,6 @@ class Test extends AsyncResource {
return;
}

if (i === 1 && this.parent !== null) {
this.reportStarted();
}

// Report the subtest's results and remove it from the ready map.
subtest.finalize();
this.readySubtests.delete(i);
Expand Down

0 comments on commit 73b38bf

Please sign in to comment.