Skip to content

Commit

Permalink
test_runner,doc: align documentation with actual stdout/stderr behavior
Browse files Browse the repository at this point in the history
PR-URL: #53131
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
MoLow authored and marco-ippolito committed Jul 19, 2024
1 parent 560392d commit 3a4a0eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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`.
Expand Down
8 changes: 0 additions & 8 deletions lib/internal/test_runner/tests_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3a4a0eb

Please sign in to comment.