Skip to content
Browse files

Test for read streams ending even if selector did not match

  • Loading branch information...
1 parent 902d7af commit 897ac97b5a9624225609a3243423cc7dc5ef3b11 @parshap parshap committed with Nov 12, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/read_stream.js
View
9 test/read_stream.js
@@ -87,3 +87,12 @@ test('stream all divs', function (t) {
fs.createReadStream(__dirname + '/read_stream.html').pipe(tr);
});
+
+test("end event when no match", function(t) {
+ // Make sure an end event is emitted even with no "h1" element"
+ var tr = trumpet();
+ tr.createReadStream("h1").on("end", function() {
+ t.end();
+ });
+ fs.createReadStream(__dirname + '/read_stream.html').pipe(tr);
+});

0 comments on commit 897ac97

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