From 033d0bb3e156308c062c20f3c060d2567fd6b891 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 2025994f3afa93..c26d91ec65eb02 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -1473,6 +1473,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`