Skip to content

Commit

Permalink
Added auto-pause test
Browse files Browse the repository at this point in the history
  • Loading branch information
felixge committed May 24, 2011
1 parent 5c41a69 commit 51e2208
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/integration/test-delayed-stream-auto-pause.js
@@ -0,0 +1,21 @@
var common = require('../common');
var assert = common.assert;
var fake = common.fake.create();
var DelayedStream = common.DelayedStream;
var Stream = require('stream').Stream;

(function testAutoPause() {
var source = new Stream();

fake.expect(source, 'pause', 1);
var delayedStream = DelayedStream.create(source);
fake.verify();
})();

(function testDisableAutoPause() {
var source = new Stream();
fake.expect(source, 'pause', 0);

var delayedStream = DelayedStream.create(source, {pauseStream: false});
fake.verify();
})();

0 comments on commit 51e2208

Please sign in to comment.