Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added spec for delayed api

  • Loading branch information...
commit 3d87c7a0031ea0fd6240629301dfe2750f925830 1 parent 568cc31
@JakubOboza authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 spec/future_toons.spec.js
View
20 spec/future_toons.spec.js
@@ -38,6 +38,26 @@ describe('Future Toons', function(){
});
+ it("should be able to delay execution", function(done){
+
+ var count = 0;
+
+ var line_cb = function(line){
+ count = count + 1;
+ };
+
+ var end_cb = function(){
+ done();
+ count.should.equal(4);
+ }
+
+ var streamer = new toons();
+ streamer.onLine(line_cb);
+ streamer.onEnd(end_cb);
+ streamer.run("./spec/fixtures/four_line.file");
+
+ });
+
});
});

0 comments on commit 3d87c7a

Please sign in to comment.
Something went wrong with that request. Please try again.