From a04f47713f84455f53614db77fd5c3374e37919d Mon Sep 17 00:00:00 2001 From: Jason Walton Date: Sat, 21 Aug 2021 11:38:16 -0400 Subject: [PATCH] test: Fix unit tests. --- test/ChannelWrapperTest.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/ChannelWrapperTest.js b/test/ChannelWrapperTest.js index 6c41511..399b594 100644 --- a/test/ChannelWrapperTest.js +++ b/test/ChannelWrapperTest.js @@ -633,8 +633,14 @@ describe('ChannelWrapper', function () { connectionManager.simulateConnect(); const channelWrapper = new ChannelWrapper(connectionManager, { setup(channel) { - channel.publish = (a, b, c, d, cb) => cb(new Error('no publish')); - channel.sendToQueue = (a, b, c, cb) => cb(new Error('no send')); + channel.publish = (a, b, c, d, cb) => { + cb(new Error('no publish')); + return true; + }; + channel.sendToQueue = (a, b, c, cb) => { + cb(new Error('no send')); + return true; + }; return Promise.resolve(); }, }); @@ -786,7 +792,7 @@ describe('ChannelWrapper', function () { let p1, p2; const channelWrapper = new ChannelWrapper(connectionManager, { setup(channel) { - channel.publish = sinon.stub(); + channel.publish = sinon.stub().callsFake(() => true); return Promise.resolve(); }, });