-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import Node 10.9.0. Redo the fix for util.inspect.custom (#357)
* Import Node 10.9.0. Redo the fix for util.inspect.custom Fixes #355 * Removed util.inspect and util.inspect.custom poly in the browser test * fallback to 'inspect' if util.inspect.custom is not available
- Loading branch information
Showing
12 changed files
with
96 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use strict'; | ||
|
||
/*<replacement>*/ | ||
var bufferShim = require('safe-buffer').Buffer; | ||
/*</replacement>*/ | ||
|
||
var common = require('../common'); | ||
|
||
// This test ensures that Readable stream will call _read() for streams | ||
// with highWaterMark === 0 upon .read(0) instead of just trying to | ||
// emit 'readable' event. | ||
|
||
var assert = require('assert/'); | ||
|
||
var _require = require('../../'), | ||
Readable = _require.Readable; | ||
|
||
var r = new Readable({ | ||
// must be called only once upon setting 'readable' listener | ||
read: common.mustCall(), | ||
highWaterMark: 0 | ||
}); | ||
|
||
var pushedNull = false; | ||
// this will trigger read(0) but must only be called after push(null) | ||
// because the we haven't pushed any data | ||
r.on('readable', common.mustCall(function () { | ||
assert.strictEqual(r.read(), null); | ||
assert.strictEqual(pushedNull, true); | ||
})); | ||
r.on('end', common.mustCall()); | ||
process.nextTick(function () { | ||
assert.strictEqual(r.read(), null); | ||
pushedNull = true; | ||
r.push(null); | ||
}); | ||
;require('tap').pass('sync run');var _list = process.listeners('uncaughtException');process.removeAllListeners('uncaughtException');_list.pop();_list.forEach(function (e) { | ||
return process.on('uncaughtException', e); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.