diff --git a/packages/@webex/http-core/test/unit/spec/interceptors/http-status.js b/packages/@webex/http-core/test/unit/spec/interceptors/http-status.js index f5f5451bbfc..e63983ed8d7 100644 --- a/packages/@webex/http-core/test/unit/spec/interceptors/http-status.js +++ b/packages/@webex/http-core/test/unit/spec/interceptors/http-status.js @@ -41,7 +41,7 @@ describe('http-core', () => { }, }; - assert.isRejected(interceptor.onResponse({}, response)); + return assert.isRejected(interceptor.onResponse({}, response)); }); }); }); diff --git a/packages/@webex/internal-plugin-conversation/test/integration/spec/get.js b/packages/@webex/internal-plugin-conversation/test/integration/spec/get.js index c54ba480b5d..2db56455bfb 100644 --- a/packages/@webex/internal-plugin-conversation/test/integration/spec/get.js +++ b/packages/@webex/internal-plugin-conversation/test/integration/spec/get.js @@ -125,7 +125,7 @@ describe('plugin-conversation', function () { }, }; - assert.isRejected(webex.internal.conversation.download(item)); + return assert.isRejected(webex.internal.conversation.download(item)); })); it('downloads and decrypts an encrypted file', () => diff --git a/packages/@webex/internal-plugin-device/test/integration/spec/device.js b/packages/@webex/internal-plugin-device/test/integration/spec/device.js index fe6507bfb24..d95aabaeeb8 100644 --- a/packages/@webex/internal-plugin-device/test/integration/spec/device.js +++ b/packages/@webex/internal-plugin-device/test/integration/spec/device.js @@ -103,7 +103,7 @@ describe('plugin-device', () => { }); it('should return a rejected promise', () => { - assert.isRejected(device.canRegister()); + return assert.isRejected(device.canRegister()); }); }); }); @@ -121,7 +121,7 @@ describe('plugin-device', () => { }); it('should return a rejected promise', () => { - assert.isRejected(device.canRegister()); + return assert.isRejected(device.canRegister()); }); }); }); diff --git a/packages/@webex/internal-plugin-device/test/unit/spec/interceptors/device-url.js b/packages/@webex/internal-plugin-device/test/unit/spec/interceptors/device-url.js index 85a64b53801..a471d125c0d 100644 --- a/packages/@webex/internal-plugin-device/test/unit/spec/interceptors/device-url.js +++ b/packages/@webex/internal-plugin-device/test/unit/spec/interceptors/device-url.js @@ -206,7 +206,7 @@ describe('plugin-device', () => { it('returns an error', () => { const promise = interceptor.onRequest(options); - assert.isRejected(promise); + return assert.isRejected(promise); }); }); }); diff --git a/packages/@webex/internal-plugin-user/test/unit/spec/user.js b/packages/@webex/internal-plugin-user/test/unit/spec/user.js index 358118ebdad..918b4579c23 100644 --- a/packages/@webex/internal-plugin-user/test/unit/spec/user.js +++ b/packages/@webex/internal-plugin-user/test/unit/spec/user.js @@ -24,7 +24,7 @@ describe('plugin-user', () => { describe('#activate()', () => { it('requires a `verificationToken` or a confirmationCode + user id', () => { - assert.isRejected( + return assert.isRejected( userService.activate(), /either options.verificationToken is required or both options.confirmationCode and options.id are required/ ); diff --git a/packages/@webex/plugin-meetings/test/unit/spec/controls-options-manager/index.js b/packages/@webex/plugin-meetings/test/unit/spec/controls-options-manager/index.js index f78893badee..dab33868177 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/controls-options-manager/index.js +++ b/packages/@webex/plugin-meetings/test/unit/spec/controls-options-manager/index.js @@ -42,7 +42,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('rejects when correct display hint is not present enabled=true', () => { @@ -50,7 +50,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can set mute on entry when the display hint is available enabled=true', () => { @@ -84,7 +84,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('rejects when correct display hint is not present enabled=true', () => { @@ -92,7 +92,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can set disallow unmute when ENABLE_HARD_MUTE display hint is available', () => { @@ -223,7 +223,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('rejects when correct display hint is not present mutedEnabled=true', () => { @@ -231,7 +231,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can set mute all when the display hint is available mutedEnabled=true', () => { diff --git a/packages/@webex/plugin-meetings/test/unit/spec/members/index.js b/packages/@webex/plugin-meetings/test/unit/spec/members/index.js index 23627ab151b..501910ba2ae 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/members/index.js +++ b/packages/@webex/plugin-meetings/test/unit/spec/members/index.js @@ -155,7 +155,7 @@ describe('plugin-meetings', () => { it('should throw a rejection if there is no locus url', async () => { const members = createMembers({url: false}); - assert.isRejected(members.addMember({email: 'test@cisco.com'})); + await assert.isRejected(members.addMember({email: 'test@cisco.com'})); }); }); @@ -285,13 +285,13 @@ describe('plugin-meetings', () => { it('should throw a rejection when calling sendDialPadKey with no tones', async () => { const members = createMembers({url: url1}); - assert.isRejected(members.sendDialPadKey()); + await assert.isRejected(members.sendDialPadKey()); }); it('should throw a rejection when calling sendDialPadKey with no member is found', async () => { const members = createMembers({url: url1}); - assert.isRejected(members.sendDialPadKey('1', '1234')); + await assert.isRejected(members.sendDialPadKey('1', '1234')); }); it('should call genderateSendDTMFOptions with proper options on Members util if we the member is valid', async () => { @@ -338,7 +338,7 @@ describe('plugin-meetings', () => { it('should throw a rejection if there is no locus url', async () => { const members = createMembers({url: false}); - assert.isRejected(members.cancelPhoneInvite({phoneNumber: '+18578675309'})); + await assert.isRejected(members.cancelPhoneInvite({phoneNumber: '+18578675309'})); }); }); diff --git a/packages/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlotManager.ts b/packages/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlotManager.ts index 6ee1128e86b..92a5a610bd5 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlotManager.ts +++ b/packages/@webex/plugin-meetings/test/unit/spec/multistream/receiveSlotManager.ts @@ -45,7 +45,7 @@ describe('ReceiveSlotManager', () => { it('rejects if there is no media connection', async () => { createSlotCallbackStub.rejects(new Error('Webrtc media connection is missing')); - assert.isRejected( + await assert.isRejected( receiveSlotManager.allocateSlot(MediaType.VideoMain), 'Webrtc media connection is missing' ); diff --git a/packages/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaManager.ts b/packages/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaManager.ts index b37c34df752..8e1521f9efa 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaManager.ts +++ b/packages/@webex/plugin-meetings/test/unit/spec/multistream/remoteMediaManager.ts @@ -1823,9 +1823,9 @@ describe('RemoteMediaManager', () => { }); describe('addMemberVideoPane()', () => { - it('fails if there is no current layout', () => { + it('fails if there is no current layout', async () => { // we haven't called start() so there is no layout set, yet - assert.isRejected( + await assert.isRejected( remoteMediaManager.addMemberVideoPane({id: 'newPane', size: 'best', csi: 54321}) ); }); @@ -1834,7 +1834,7 @@ describe('RemoteMediaManager', () => { await remoteMediaManager.start(); await remoteMediaManager.setLayout('Stage'); - assert.isRejected( + await assert.isRejected( remoteMediaManager.addMemberVideoPane({id: 'stage-3', size: 'best', csi: 54321}) ); }); @@ -1886,9 +1886,9 @@ describe('RemoteMediaManager', () => { }); describe('removeMemberVideoPane()', () => { - it('fails if there is no current layout', () => { + it('fails if there is no current layout', async () => { // we haven't called start() so there is no layout set, yet - assert.isRejected(remoteMediaManager.removeMemberVideoPane('newPane')); + await assert.isRejected(remoteMediaManager.removeMemberVideoPane('newPane')); }); it('does nothing when called for a pane not in the current layout', async () => { diff --git a/packages/@webex/plugin-meetings/test/unit/spec/reconnection-manager/index.js b/packages/@webex/plugin-meetings/test/unit/spec/reconnection-manager/index.js index dfc0e8c9541..d7363d56522 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/reconnection-manager/index.js +++ b/packages/@webex/plugin-meetings/test/unit/spec/reconnection-manager/index.js @@ -427,14 +427,14 @@ describe('plugin-meetings', () => { clock.restore(); }); - it('should set the disconnected state to true', () => { + it('should set the disconnected state to true', async () => { const promise = reconnectionManager.waitForIceReconnect(); assert.isTrue(reconnectionManager.iceState.disconnected); // we let the timer expire clock.tick(reconnectionManager.iceState.timeoutDuration); - assert.isRejected(promise); + await assert.isRejected(promise); }); it('should return a promise that rejects after a duration', async () => { @@ -442,7 +442,7 @@ describe('plugin-meetings', () => { // we let the timer expire clock.tick(reconnectionManager.iceState.timeoutDuration); - assert.isRejected(promise); + await assert.isRejected(promise); }); it('should resolve when ICE is reconnected', async () => { diff --git a/packages/@webex/plugin-meetings/test/unit/spec/recording-controller/index.js b/packages/@webex/plugin-meetings/test/unit/spec/recording-controller/index.js index 6fe2abda085..b6496489323 100644 --- a/packages/@webex/plugin-meetings/test/unit/spec/recording-controller/index.js +++ b/packages/@webex/plugin-meetings/test/unit/spec/recording-controller/index.js @@ -51,7 +51,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('rejects when correct display hint is present but the policy is false', () => { @@ -61,7 +61,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can start recording when the correct display hint is present', () => { @@ -85,7 +85,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('rejects when correct display hint is present but the policy is false', () => { @@ -95,7 +95,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can stop recording when the correct display hint is present', () => { @@ -119,7 +119,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('rejects when correct display hint is present but the policy is false', () => { @@ -131,7 +131,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can pause recording when the correct display hint is present', () => { @@ -155,7 +155,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('rejects when correct display hint is present but the policy is false', () => { @@ -167,7 +167,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); @@ -211,7 +211,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can start recording when the correct display hint is present', () => { @@ -249,7 +249,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can stop recording when the correct display hint is present', () => { @@ -287,7 +287,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can pause recording when the correct display hint is present', () => { @@ -325,7 +325,7 @@ describe('plugin-meetings', () => { assert.notCalled(request.request); - assert.isRejected(result); + return assert.isRejected(result); }); it('can resume recording when the correct display hint is present', () => { diff --git a/packages/@webex/plugin-presence/test/unit/spec/presence.ts b/packages/@webex/plugin-presence/test/unit/spec/presence.ts index ffdcf93377d..c9b8b430068 100644 --- a/packages/@webex/plugin-presence/test/unit/spec/presence.ts +++ b/packages/@webex/plugin-presence/test/unit/spec/presence.ts @@ -22,7 +22,7 @@ describe('plugin-presence', () => { describe('#get()', () => { it('requires a person id parameter', () => { - assert.isRejected(webex.presence.get(), /A person id is required/); + return assert.isRejected(webex.presence.get(), /A person id is required/); }); }); diff --git a/packages/@webex/webex-core/test/integration/spec/services/services.js b/packages/@webex/webex-core/test/integration/spec/services/services.js index 930ce250c0a..fe9d654e872 100644 --- a/packages/@webex/webex-core/test/integration/spec/services/services.js +++ b/packages/@webex/webex-core/test/integration/spec/services/services.js @@ -1025,25 +1025,25 @@ describe('webex-core', () => { }); describe('when using the name parameter property', () => { - it('should return a rejected promise', () => { + it('should return a rejected promise', async () => { const submitMetrics = sinon.stub(webex.internal.metrics, 'submitClientMetrics'); const waitForService = services.waitForService({name, timeout}); assert.called(submitMetrics); - assert.isRejected(waitForService); + await assert.isRejected(waitForService); assert.isTrue(catalog.isReady); }); }); describe('when using the name and url parameter properties', () => { - it('should return a rejected promise', () => { + it('should return a rejected promise', async () => { const waitForService = services.waitForService({ name, url, timeout, }); - assert.isRejected(waitForService); + await assert.isRejected(waitForService); assert.isTrue(catalog.isReady); }); }); diff --git a/packages/@webex/webex-core/test/unit/spec/interceptors/redirect.js b/packages/@webex/webex-core/test/unit/spec/interceptors/redirect.js index 836d2fd1d5c..3742f7994cf 100644 --- a/packages/@webex/webex-core/test/unit/spec/interceptors/redirect.js +++ b/packages/@webex/webex-core/test/unit/spec/interceptors/redirect.js @@ -65,7 +65,7 @@ describe('webex-core', () => { }); }); - it('does not redirect on reaching max redirects', () => { + it('does not redirect on reaching max redirects', async () => { const response = { statusCode: 404, headers: {}, @@ -78,7 +78,7 @@ describe('webex-core', () => { }, }; - assert.isRejected(interceptor.onResponse({$redirectCount: 5}, response)); + await assert.isRejected(interceptor.onResponse({$redirectCount: 5}, response)); }); it('returns when locus redirect is not encountered', () => { diff --git a/packages/@webex/webex-core/test/unit/spec/services/interceptors/service.js b/packages/@webex/webex-core/test/unit/spec/services/interceptors/service.js index 8cc2d18cad4..73ec1449b1b 100644 --- a/packages/@webex/webex-core/test/unit/spec/services/interceptors/service.js +++ b/packages/@webex/webex-core/test/unit/spec/services/interceptors/service.js @@ -149,10 +149,10 @@ describe('webex-core', () => { waitForService.rejects(); }); - it('should return a rejected promise', () => { + it('should return a rejected promise', async () => { const promise = interceptor.onRequest(options); - assert.isRejected(promise); + await assert.isRejected(promise); }); }); });