Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update afeter @jasnell's reviewing
  • Loading branch information
XadillaX committed Jun 6, 2017
commit 2a42456773eccf376f0f932ebf14bab6711facb0
22 changes: 15 additions & 7 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,21 @@ Checks whether `IPv6` is supported on this platform.

Checks if there are multiple localhosts available.

### hijackStderr/Stdout(listener)
### hijackStderr(listener)
* `listener` [<Function>][MDN-Function]: a listener with a single parameter called `data`.

Eavesdrop to `process.stderr.write` or `process.stdout.write` calls. Once
`process.std*.write` is called, `listener` will also be called and the `data` of
`write` function will be passed to `listener`. What's more,
`process.std*.writeTimes` is a count of the number of calls.
Eavesdrop to `process.stderr.write` calls. Once `process.stderr.write` is
called, `listener` will also be called and the `data` of `write` function will
be passed to `listener`. What's more, `process.stderr.writeTimes` is a count of
the number of calls.

### hijackStdout(listener)
* `listener` [<Function>][MDN-Function]: a listener with a single parameter called `data`.

Eavesdrop to `process.stdout.write` calls. Once `process.stdout.write` is
called, `listener` will also be called and the `data` of `write` function will
be passed to `listener`. What's more, `process.stdout.writeTimes` is a count of
the number of calls.

### inFreeBSDJail
* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
Expand Down Expand Up @@ -258,11 +266,11 @@ Port tests are running on.

Deletes the 'tmp' dir and recreates it

### restoreStderr
### restoreStderr()

Restore the original `process.stderr.write`.

### restoreStdout
### restoreStdout()

Restore the original `process.stdout.write`.

Expand Down