From 68f2c49d0e97d3b748f0a7e008c9ddd474b231f4 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`