Skip to content

Commit

Permalink
Merge branch 'buffered-tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 8, 2017
2 parents 0c8b426 + 60efe95 commit 5d60097
Show file tree
Hide file tree
Showing 286 changed files with 4,432 additions and 540 deletions.
11 changes: 11 additions & 0 deletions bin/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,17 @@ Environment Variables:
running child tests so that their output
is parseable by the test harness.

TAP_DIAG Set to '1' to show diagnostics by
default for passing tests. Set to '0'
to NOT show diagnostics by default for
failing tests. If not one of these two
values, then diagnostics are printed by
default for failing tests, and not for
passing tests.

TAP_BUFFER Set to '1' to run subtests in buffered
mode by default.

_TAP_COVERAGE_ Reserved for internal use.

Config Files:
Expand Down
6 changes: 6 additions & 0 deletions lib/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ process.on('exit', function (code) {

tap.pipe = function () {
didPipe = true
tap._runChild = Test.prototype._runChild
tap.push = Test.prototype.push
tap.pipe = Test.prototype.pipe
process.on('uncaughtException', onUncaught)
Expand All @@ -52,6 +53,11 @@ function pipe () {
tap.pipe(process.stdout)
}

tap._runChild = function _runChild () {
pipe()
return tap._runChild.apply(tap, arguments)
}

tap.push = function push () {
pipe()
return tap.push.apply(tap, arguments)
Expand Down
Loading

0 comments on commit 5d60097

Please sign in to comment.