Skip to content

Commit

Permalink
WIP: check on attaching
Browse files Browse the repository at this point in the history
  • Loading branch information
ttypic committed Feb 2, 2024
1 parent f463647 commit 3a4d13f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/realtime/channel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1684,5 +1684,20 @@ define(['ably', 'shared_helper', 'async', 'chai'], function (Ably, helper, async
});
});
});

it('should not throw exception then run RealtimeChannels.get() with same options', function (done) {
const realtime = helper.AblyRealtime();
const channel = realtime.channels.get('channel-with-options', { mode: ['PRESENCE'] });
channel.attach();
channel.whenState('attaching', function () {
try {
realtime.channels.get('channel-with-options', { mode: ['PRESENCE'] });
closeAndFinish(done, realtime);
} catch (err) {
closeAndFinish(done, realtime, err);
}
});
});

});
});

0 comments on commit 3a4d13f

Please sign in to comment.