mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
500 B
23 lines
500 B
var assert = require('assert');
|
|
var common = require('../common');
|
|
|
|
var stream = require('stream');
|
|
|
|
var readable = new stream.Readable;
|
|
|
|
// _read is a noop, here.
|
|
readable._read = Function();
|
|
|
|
// default state of a stream is not "paused"
|
|
assert.ok(!readable.isPaused());
|
|
|
|
// make the stream start flowing...
|
|
readable.on('data', Function());
|
|
|
|
// still not paused.
|
|
assert.ok(!readable.isPaused());
|
|
|
|
readable.pause();
|
|
assert.ok(readable.isPaused());
|
|
readable.resume();
|
|
assert.ok(!readable.isPaused());
|
|
|