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 <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
  • Loading branch information
cjihrig authored Mar 16, 2024
1 parent dafe004 commit 97b2c53
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 @@ -469,10 +469,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 97b2c53

Please sign in to comment.