test,console: add testing for monkeypatching of console stdio by Trott · Pull Request #26561 · nodejs/node

@Trott

lib/internal/console/constructor.js contains setters for console._stdout
and console._stderr but these setters are not used in our tests or in
Node.js core. (This is confirmed by our nightly coverage reports.)

Add a test to check monkeypatching _stdout and _stderr on a console
object.

Version 2.6.9 of the very-popular npm module `debug` used this
monkeypatching in its code. No other version did and they are now at
version 4.something. It is not inconceivable that we would want to
change the setters to throw rather than work. Given that this has seen
use in the ecosystem, I'm inclined to leave the functionality in place.

@Trott added test

Issues and PRs related to the tests.

console

Issues and PRs related to the console subsystem.

labels

Mar 10, 2019

@Trott Trott added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Mar 12, 2019

Trott added a commit to Trott/io.js that referenced this pull request

Mar 17, 2019
lib/internal/console/constructor.js contains setters for console._stdout
and console._stderr but these setters are not used in our tests or in
Node.js core. (This is confirmed by our nightly coverage reports.)

Add a test to check monkeypatching _stdout and _stderr on a console
object.

PR-URL: nodejs#26561
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

targos pushed a commit to targos/node that referenced this pull request

Mar 27, 2019
lib/internal/console/constructor.js contains setters for console._stdout
and console._stderr but these setters are not used in our tests or in
Node.js core. (This is confirmed by our nightly coverage reports.)

Add a test to check monkeypatching _stdout and _stderr on a console
object.

PR-URL: nodejs#26561
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

targos pushed a commit that referenced this pull request

Mar 27, 2019
lib/internal/console/constructor.js contains setters for console._stdout
and console._stderr but these setters are not used in our tests or in
Node.js core. (This is confirmed by our nightly coverage reports.)

Add a test to check monkeypatching _stdout and _stderr on a console
object.

PR-URL: #26561
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

BethGriggs pushed a commit that referenced this pull request

Apr 17, 2019
lib/internal/console/constructor.js contains setters for console._stdout
and console._stderr but these setters are not used in our tests or in
Node.js core. (This is confirmed by our nightly coverage reports.)

Add a test to check monkeypatching _stdout and _stderr on a console
object.

PR-URL: #26561
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

This was referenced

May 29, 2019

@Trott Trott deleted the test-console-setters branch

January 13, 2022 22:51