-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
test: move hijackstdio out of require('common') #22462
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@@ -57,4 +62,4 @@ tests.forEach(function(test) { | |||
|
|||
assert.strictEqual(process.stdout.writeTimes, tests.length); | |||
|
|||
common.restoreStdout(); | |||
restoreStdout(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated but why isn't restoreStderr()
also used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember signing off on this (#13439)... I want to say it's related to the mustNotCall
mechanism?...
But it should have been docu-commented for future reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NJP (Not James's Problem)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good first issue #22472
7bd43af
to
0c8ad74
Compare
test/common/README.md
Outdated
* `listener` [<Function>]: a listener with a single parameter | ||
called `data`. | ||
|
||
Eavesdrop to `process.stderr.write` calls. Once `process.stderr.write` is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe add parentheses to `process.stderr.write`
, `process.stdout.write`
and `write` function
in all 4 sections.
Move the hijackstdio functions out of common so that they are imported only into the tests that actually need them
72a28c9
to
f2af892
Compare
Shouldn't the module be camelCased as |
Move the hijackstdio functions out of common so that they are imported only into the tests that actually need them PR-URL: #22462 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Landed in 5da834f |
Move the hijackstdio functions out of common so that they are imported only into the tests that actually need them PR-URL: #22462 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Move the hijackstdio functions out of common so that they are imported only into the tests that actually need them PR-URL: #22462 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Move the hijackstdio functions out of common so that they are imported only into the tests that actually need them PR-URL: #22462 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Move the hijackstdio functions out of common so that they are
imported only into the tests that actually need them
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes