Commit Graph

2 Commits

Author SHA1 Message Date
Rich Trott
6874288f6e
test: fix test-console-stdio-setters to test setters
test-console-stdio-setters needs to test against the global console in
order to test the setters for the lazy-loaded _stdout and _stderr
properties.

PR-URL: https://github.com/nodejs/node/pull/26796
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-27 22:16:13 +01:00
Rich Trott
00a6f7686e
test,console: add testing for monkeypatching of console stdio
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: https://github.com/nodejs/node/pull/26561
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-27 21:58:58 +01:00