Skip to content

Commit

Permalink
test: Fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalton committed Aug 21, 2021
1 parent 7a14b8b commit a04f477
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/ChannelWrapperTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
});
Expand Down Expand Up @@ -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();
},
});
Expand Down

0 comments on commit a04f477

Please sign in to comment.