From 1afc5fb2ddff9515955c5baa03cedef81e13176f Mon Sep 17 00:00:00 2001 From: David Mihal Date: Fri, 23 Dec 2016 12:03:07 +0200 Subject: [PATCH] Add test for not passing callback to handler --- tests/publication-collector.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/publication-collector.test.js b/tests/publication-collector.test.js index 82ef2f2..501a385 100644 --- a/tests/publication-collector.test.js +++ b/tests/publication-collector.test.js @@ -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', () => {