From 3a4a0ebd06216251aca1394a69d124c5b9bb9399 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Tue, 28 May 2024 22:44:16 +0300 Subject: [PATCH] test_runner,doc: align documentation with actual stdout/stderr behavior PR-URL: https://github.com/nodejs/node/pull/53131 Reviewed-By: Chemi Atlow Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- doc/api/test.md | 8 -------- lib/internal/test_runner/tests_stream.js | 8 -------- 2 files changed, 16 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index 8c4f5d90ae0633..3c2dde1d1ac938 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -2724,11 +2724,7 @@ The corresponding execution ordered event is `'test:dequeue'`. ### Event: `'test:stderr'` * `data` {Object} - * `column` {number|undefined} The column number where the test is defined, or - `undefined` if the test was run through the REPL. * `file` {string} The path of the test file. - * `line` {number|undefined} The line number where the test is defined, or - `undefined` if the test was run through the REPL. * `message` {string} The message written to `stderr`. Emitted when a running test writes to `stderr`. @@ -2739,11 +2735,7 @@ defined. ### Event: `'test:stdout'` * `data` {Object} - * `column` {number|undefined} The column number where the test is defined, or - `undefined` if the test was run through the REPL. * `file` {string} The path of the test file. - * `line` {number|undefined} The line number where the test is defined, or - `undefined` if the test was run through the REPL. * `message` {string} The message written to `stdout`. Emitted when a running test writes to `stdout`. diff --git a/lib/internal/test_runner/tests_stream.js b/lib/internal/test_runner/tests_stream.js index 83b2a903218df1..08d4397ae64a3c 100644 --- a/lib/internal/test_runner/tests_stream.js +++ b/lib/internal/test_runner/tests_stream.js @@ -123,14 +123,6 @@ class TestsStream extends Readable { }); } - stderr(loc, message) { - this[kEmitMessage]('test:stderr', { __proto__: null, message, ...loc }); - } - - stdout(loc, message) { - this[kEmitMessage]('test:stdout', { __proto__: null, message, ...loc }); - } - coverage(nesting, loc, summary) { this[kEmitMessage]('test:coverage', { __proto__: null,