From 73b38bfa9ed804fe2f834f1732aaa2e153daaf75 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 7c8478f456bb13..e558aa683c240d 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -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);