diff --git a/lib/internal/test_runner/tap_stream.js b/lib/internal/test_runner/tap_stream.js index a6bfbb3367cd79..176676f5a74d35 100644 --- a/lib/internal/test_runner/tap_stream.js +++ b/lib/internal/test_runner/tap_stream.js @@ -71,6 +71,10 @@ class TapStream extends Readable { return `TODO${reason ? ` ${tapEscape(reason)}` : ''}`; } + subTest(indent, name) { + this.#tryPush(`${indent}# Subtest: ${tapEscape(name)}\n`); + } + details(indent, duration, error) { let details = `${indent} ---\n`; diff --git a/lib/internal/test_runner/test.js b/lib/internal/test_runner/test.js index cac379b32582a4..e7180ff1df811b 100644 --- a/lib/internal/test_runner/test.js +++ b/lib/internal/test_runner/test.js @@ -280,6 +280,7 @@ class Test extends AsyncResource { } start() { + this.reporter.subTest(this.indent, this.name); // If there is enough available concurrency to run the test now, then do // it. Otherwise, return a Promise to the caller and mark the test as // pending for later execution.