Skip to content

Commit

Permalink
test: ensure realtime clients are disposed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
owenpearson committed Feb 29, 2024
1 parent 28c7efc commit bcc0927
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/realtime/channel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1479,11 +1479,16 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, helper, async

channel.state = 'suspended';
whenPromiseSettles(channel.detach(), function () {
expect(channel.state).to.equal(
'detached',
'Check that detach on suspended channel results in detached channel'
);
done();
try {
expect(channel.state).to.equal(
'detached',
'Check that detach on suspended channel results in detached channel'
);

closeAndFinish(done, realtime);
} catch (err) {
closeAndFinish(done, realtime, err);
}
});
});

Expand Down

0 comments on commit bcc0927

Please sign in to comment.