mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 03:13:13 +00:00

PR-URL: https://github.com/nodejs/node/pull/10550 Reviewed-By: Rich Trott <rtrott@gmail.com>
20 lines
349 B
JavaScript
20 lines
349 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const Readable = require('stream').Readable;
|
|
|
|
var _readCalled = false;
|
|
function _read(n) {
|
|
_readCalled = true;
|
|
this.push(null);
|
|
}
|
|
|
|
var r = new Readable({ read: _read });
|
|
r.resume();
|
|
|
|
process.on('exit', function() {
|
|
assert.equal(r._read, _read);
|
|
assert(_readCalled);
|
|
});
|