Skip to content

Commit

Permalink
Allow env TAP_BUFFER=1 to be overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Dec 30, 2016
1 parent 4ac5866 commit 157ffdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Test (options) {

this._lineBuf = ''
this._buffer = ''
this._buffered = options.buffered || false
this._buffered = options.buffered
this._deferred = null
this._autoend = !!options.autoend
this._name = options.name || '(unnamed test)'
Expand Down Expand Up @@ -426,10 +426,10 @@ function getBufferedOption (self, extra) {
return true
} else if (extra.buffered === false) {
return false
} else if (self._buffered !== undefined) {
return self._buffered
} else if (process.env.TAP_BUFFER === '1') {
return true
} else if (self._buffered) {
return true
} else {
return false
}
Expand Down
2 changes: 1 addition & 1 deletion test/only-non-tap-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if (process.argv[2] === 'child') {
} else if (process.argv[2] !== 'silent') {
var t = require('../')
var Test = t.Test
var tt = new Test()
var tt = new Test({ buffered: false })

var out = ''
tt.on('data', function (c) {
Expand Down

0 comments on commit 157ffdd

Please sign in to comment.