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: #15720
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Oct 11, 2017
1 parent 995948a commit df1d988
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 df1d988

Please sign in to comment.