mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
4d958725b4
const and let instead var assert.strictEqual instead assert.equal PR-URL: https://github.com/nodejs/node/pull/8668 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
24 lines
508 B
JavaScript
24 lines
508 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const stream = require('stream');
|
|
|
|
const 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());
|