From 3f259b7a303ff0f7c15365f0dd8929fdacbcf749 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Wed, 31 May 2023 02:53:57 +0300 Subject: [PATCH] test_runner: emit `test:watch:drained` event PR-URL: https://github.com/nodejs/node/pull/48259 Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum --- doc/api/test.md | 4 ++++ lib/internal/test_runner/runner.js | 35 ++++++++++++++++++++---------- test/parallel/test-runner-run.mjs | 10 +++++++++ 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index 8c3c848fe8d936..e520e18e3d8431 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -1538,6 +1538,10 @@ This event is only emitted if `--test` flag is passed. Emitted when a running test writes to `stdout`. This event is only emitted if `--test` flag is passed. +### Event: `'test:watch:drained'` + +Emitted when no more tests are queued for execution in watch mode. + ## Class: `TestContext`