Skip to content

Commit

Permalink
doc: explain common.restore* functions
Browse files Browse the repository at this point in the history
Explain that `common.restoreStderr()` and `common.restoreStdout()` are
for use with `common.hijackStderr()` and `common.hijackStdout()`
respectively.

PR-URL: nodejs#15720
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
  • Loading branch information
Trott committed Oct 5, 2017
1 parent 42a2a9b commit 463484b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,13 @@ Deletes the 'tmp' dir and recreates it

### restoreStderr()

Restore the original `process.stderr.write`.
Restore the original `process.stderr.write`. Used to restore `stderr` to its
original state after calling [`common.hijackStdErr()`][].

### restoreStdout()

Restore the original `process.stdout.write`.
Restore the original `process.stdout.write`. Used to restore `stdout` to its
original state after calling [`common.hijackStdOut()`][].

### rootDir
* return [&lt;String>]
Expand Down Expand Up @@ -456,4 +458,6 @@ implementation with tests from
[&lt;Object>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
[&lt;RegExp>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
[&lt;String>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type
[`common.hijackStdErr()`]: #hijackstderrlistener
[`common.hijackStdOut()`]: #hijackstdoutlistener
[internationalization]: https://github.com/nodejs/node/wiki/Intl

0 comments on commit 463484b

Please sign in to comment.