Skip to content

Commit

Permalink
Add test for not passing callback to handler
Browse files Browse the repository at this point in the history
  • Loading branch information
dmihal committed Dec 23, 2016
1 parent 135b891 commit 1afc5fb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/publication-collector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ describe('PublicationCollector', () => {

collector.collect('publicationWithArgs', 'foo', 'bar');
});

it('should support optional publication arguments', (done) => {
Meteor.publish('publicationWithOptionalArg', function(arg1 = 'foo') {
assert.equal(arg1, 'foo');
this.ready();
done();
});

const collector = new PublicationCollector();

collector.collect('publicationWithOptionalArg', function(){});
});
});

describe('Added', () => {
Expand Down

0 comments on commit 1afc5fb

Please sign in to comment.