From d79b8d7cdb0fc07d3f3c11897031e5da20702772 Mon Sep 17 00:00:00 2001 From: jakecastelli <38635403+jakecastelli@users.noreply.github.com> Date: Fri, 28 Jun 2024 22:05:25 +0930 Subject: [PATCH] Update test/parallel/test-runner-watch-mode-complex.mjs Co-authored-by: Chemi Atlow --- test/parallel/test-runner-watch-mode-complex.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-runner-watch-mode-complex.mjs b/test/parallel/test-runner-watch-mode-complex.mjs index 2fd8b498b57d29..763e854e86180b 100644 --- a/test/parallel/test-runner-watch-mode-complex.mjs +++ b/test/parallel/test-runner-watch-mode-complex.mjs @@ -62,8 +62,11 @@ describe('test runner watch mode with more complex setup', () => { currentRun += data.toString(); const testRuns = stdout.match(/# duration_ms\s\d+/g); + if (testRuns?.length >= 2) { + ran2.resolve(); + return; + } if (testRuns?.length >= 1) ran1.resolve(); - if (testRuns?.length >= 2) ran2.resolve(); }); await ran1.promise;