From 97b2c5344dff702c324515d95e6cfa340e9b31e0 Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Sat, 16 Mar 2024 17:36:58 -0400 Subject: [PATCH] test_runner: remove redundant report call 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: https://github.com/nodejs/node/pull/52089 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Moshe Atlow Reviewed-By: Marco Ippolito Reviewed-By: Luigi Pinca Reviewed-By: Raz Luvaton --- lib/internal/test_runner/test.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index d57c1d6d12610e..126949d2584e38 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -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);