@webex/plugin-meetings 2.60.0-next.2 → 2.60.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -178,9 +178,10 @@ describe('plugin-meetings', () => {
178
178
  */
179
179
  describe('ReconnectionManager', () => {
180
180
  let reconnectionManager;
181
+ let fakeMeeting;
181
182
 
182
183
  beforeEach(() => {
183
- reconnectionManager = new ReconnectionManager({
184
+ fakeMeeting = {
184
185
  config: {
185
186
  reconnection: {
186
187
  enabled: true,
@@ -195,7 +196,9 @@ describe('plugin-meetings', () => {
195
196
  },
196
197
  },
197
198
  },
198
- });
199
+ };
200
+
201
+ reconnectionManager = new ReconnectionManager(fakeMeeting);
199
202
  });
200
203
 
201
204
  describe('iceReconnected()', () => {
@@ -300,29 +303,41 @@ describe('plugin-meetings', () => {
300
303
  assert.isTrue(reconnectionManager.iceState.disconnected);
301
304
  });
302
305
  });
306
+ });
303
307
 
304
- describe('setStatus()', () => {
305
- beforeEach(() => {
306
- reconnectionManager.status = RECONNECTION.STATE.DEFAULT_STATUS;
307
- });
308
+ describe('setStatus()', () => {
309
+ beforeEach(() => {
310
+ reconnectionManager.status = RECONNECTION.STATE.DEFAULT_STATUS;
311
+ });
308
312
 
309
- it('should correctly change status to in progress', () => {
310
- reconnectionManager.setStatus(RECONNECTION.STATE.IN_PROGRESS);
313
+ it('should correctly change status to in progress', () => {
314
+ reconnectionManager.setStatus(RECONNECTION.STATE.IN_PROGRESS);
311
315
 
312
- assert.equal(reconnectionManager.status, RECONNECTION.STATE.IN_PROGRESS);
313
- });
316
+ assert.equal(reconnectionManager.status, RECONNECTION.STATE.IN_PROGRESS);
317
+ });
314
318
 
315
- it('should correctly change status to complete', () => {
316
- reconnectionManager.setStatus(RECONNECTION.STATE.COMPLETE);
319
+ it('should correctly change status to complete', () => {
320
+ reconnectionManager.setStatus(RECONNECTION.STATE.COMPLETE);
317
321
 
318
- assert.equal(reconnectionManager.status, RECONNECTION.STATE.COMPLETE);
319
- });
322
+ assert.equal(reconnectionManager.status, RECONNECTION.STATE.COMPLETE);
323
+ });
320
324
 
321
- it('should correctly change status to failure', () => {
322
- reconnectionManager.setStatus(RECONNECTION.STATE.FAILURE);
325
+ it('should correctly change status to failure', () => {
326
+ reconnectionManager.setStatus(RECONNECTION.STATE.FAILURE);
323
327
 
324
- assert.equal(reconnectionManager.status, RECONNECTION.STATE.FAILURE);
325
- });
328
+ assert.equal(reconnectionManager.status, RECONNECTION.STATE.FAILURE);
329
+ });
330
+ });
331
+
332
+ describe('cleanUp()', () => {
333
+ it('should call reset and keep reference to meeting object', () => {
334
+ const resetSpy = sinon.spy(reconnectionManager, 'reset');
335
+ assert.equal(reconnectionManager.meeting, fakeMeeting);
336
+
337
+ reconnectionManager.cleanUp();
338
+
339
+ assert.equal(reconnectionManager.meeting, fakeMeeting);
340
+ assert.calledOnce(reconnectionManager.reset);
326
341
  });
327
342
  });
328
343
  });