Permalink
Browse files

Added auto-pause test

  • Loading branch information...
1 parent 5c41a69 commit 51e220888276be2793f4e135888290588fe1ab1c @felixge committed May 24, 2011
Showing with 21 additions and 0 deletions.
  1. +21 −0 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.