Skip to content

Commit

Permalink
Add commentFilter test for hasNext starting on a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrevo committed Oct 17, 2015
1 parent c45c2e6 commit fbcb2e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/streams/commentFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ describe('commentFilter', function() {
assert.equal(stream.next(), 'b');
});

it('hasNext when starting on a comment and there is a newline', function() {
var stream = commentFilter(
LineStream('test', '// foobar\n')
);

assert.equal(stream.hasNext(), true);
});

describeStream(function(data) {
return commentFilter(LineStream('test', data));
});
Expand Down

0 comments on commit fbcb2e1

Please sign in to comment.