Skip to content

Commit 6aa1783

Browse files
committed
test: Add test case to ensure we don't throw when removing a 'setup' that is not on the channel.
re: #92
1 parent c285669 commit 6aa1783

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/ChannelWrapperTest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,11 @@ describe('ChannelWrapper', function () {
480480
expect(setup).to.have.not.beenCalled;
481481
});
482482

483+
it('should fail silently when removing a setup that was not added', async () => {
484+
const channelWrapper = new ChannelWrapper(connectionManager);
485+
await channelWrapper.removeSetup(() => undefined);
486+
});
487+
483488
it('should run teardown when removing a setup if we are connected', async function () {
484489
const setup = jest.fn().mockImplementation(() => Promise.resolve());
485490
const teardown = jest.fn().mockImplementation(() => Promise.resolve());

0 commit comments

Comments
 (0)