Skip to content

Commit

Permalink
test: Add test case to ensure we don't throw when removing a 'setup' …
Browse files Browse the repository at this point in the history
…that is not on the channel.

re: #92
  • Loading branch information
jwalton committed Oct 17, 2022
1 parent c285669 commit 6aa1783
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/ChannelWrapperTest.ts
Expand Up @@ -480,6 +480,11 @@ describe('ChannelWrapper', function () {
expect(setup).to.have.not.beenCalled;
});

it('should fail silently when removing a setup that was not added', async () => {
const channelWrapper = new ChannelWrapper(connectionManager);
await channelWrapper.removeSetup(() => undefined);
});

it('should run teardown when removing a setup if we are connected', async function () {
const setup = jest.fn().mockImplementation(() => Promise.resolve());
const teardown = jest.fn().mockImplementation(() => Promise.resolve());
Expand Down

0 comments on commit 6aa1783

Please sign in to comment.