@webex/calling 3.0.0-next.8 → 3.0.1

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.
Files changed (219) hide show
  1. package/dist/CallHistory/CallHistory.js +49 -49
  2. package/dist/CallHistory/CallHistory.js.map +1 -1
  3. package/dist/CallHistory/CallHistory.test.js +9 -0
  4. package/dist/CallHistory/CallHistory.test.js.map +1 -1
  5. package/dist/CallHistory/callHistoryFixtures.js +63 -7
  6. package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
  7. package/dist/CallHistory/constants.js +9 -18
  8. package/dist/CallHistory/constants.js.map +1 -1
  9. package/dist/CallHistory/types.js.map +1 -1
  10. package/dist/CallSettings/CallSettings.js +18 -13
  11. package/dist/CallSettings/CallSettings.js.map +1 -1
  12. package/dist/CallSettings/CallSettings.test.js.map +1 -1
  13. package/dist/CallSettings/UcmBackendConnector.js +7 -8
  14. package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
  15. package/dist/CallSettings/UcmBackendConnector.test.js +69 -37
  16. package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
  17. package/dist/CallSettings/WxCallBackendConnector.js +19 -13
  18. package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
  19. package/dist/CallSettings/WxCallBackendConnector.test.js +2 -2
  20. package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
  21. package/dist/CallSettings/constants.js +11 -22
  22. package/dist/CallSettings/constants.js.map +1 -1
  23. package/dist/CallSettings/testFixtures.js +4 -8
  24. package/dist/CallSettings/testFixtures.js.map +1 -1
  25. package/dist/CallSettings/types.js.map +1 -1
  26. package/dist/CallingClient/CallingClient.js +134 -75
  27. package/dist/CallingClient/CallingClient.js.map +1 -1
  28. package/dist/CallingClient/CallingClient.test.js +170 -109
  29. package/dist/CallingClient/CallingClient.test.js.map +1 -1
  30. package/dist/CallingClient/callRecordFixtures.js +2 -4
  31. package/dist/CallingClient/callRecordFixtures.js.map +1 -1
  32. package/dist/CallingClient/calling/CallerId/index.js +9 -29
  33. package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
  34. package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
  35. package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
  36. package/dist/CallingClient/calling/call.js +140 -80
  37. package/dist/CallingClient/calling/call.js.map +1 -1
  38. package/dist/CallingClient/calling/call.test.js +651 -409
  39. package/dist/CallingClient/calling/call.test.js.map +1 -1
  40. package/dist/CallingClient/calling/callManager.js +3 -14
  41. package/dist/CallingClient/calling/callManager.js.map +1 -1
  42. package/dist/CallingClient/calling/callManager.test.js +1 -1
  43. package/dist/CallingClient/calling/callManager.test.js.map +1 -1
  44. package/dist/CallingClient/calling/types.js +31 -33
  45. package/dist/CallingClient/calling/types.js.map +1 -1
  46. package/dist/CallingClient/callingClientFixtures.js +107 -17
  47. package/dist/CallingClient/callingClientFixtures.js.map +1 -1
  48. package/dist/CallingClient/constants.js +101 -193
  49. package/dist/CallingClient/constants.js.map +1 -1
  50. package/dist/CallingClient/line/index.js +20 -18
  51. package/dist/CallingClient/line/index.js.map +1 -1
  52. package/dist/CallingClient/line/line.test.js +13 -13
  53. package/dist/CallingClient/line/line.test.js.map +1 -1
  54. package/dist/CallingClient/line/types.js +7 -11
  55. package/dist/CallingClient/line/types.js.map +1 -1
  56. package/dist/CallingClient/registration/register.js +102 -111
  57. package/dist/CallingClient/registration/register.js.map +1 -1
  58. package/dist/CallingClient/registration/register.test.js +33 -32
  59. package/dist/CallingClient/registration/register.test.js.map +1 -1
  60. package/dist/CallingClient/registration/registerFixtures.js +5 -10
  61. package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
  62. package/dist/CallingClient/registration/types.js.map +1 -1
  63. package/dist/CallingClient/types.js.map +1 -1
  64. package/dist/Contacts/ContactsClient.js +30 -19
  65. package/dist/Contacts/ContactsClient.js.map +1 -1
  66. package/dist/Contacts/ContactsClient.test.js +4 -4
  67. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  68. package/dist/Contacts/constants.js +10 -18
  69. package/dist/Contacts/constants.js.map +1 -1
  70. package/dist/Contacts/contactFixtures.js +26 -52
  71. package/dist/Contacts/contactFixtures.js.map +1 -1
  72. package/dist/Contacts/types.js +29 -9
  73. package/dist/Contacts/types.js.map +1 -1
  74. package/dist/Errors/catalog/CallError.js +3 -5
  75. package/dist/Errors/catalog/CallError.js.map +1 -1
  76. package/dist/Errors/catalog/CallingDeviceError.js +4 -6
  77. package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
  78. package/dist/Errors/catalog/ExtendedError.js +2 -3
  79. package/dist/Errors/catalog/ExtendedError.js.map +1 -1
  80. package/dist/Errors/catalog/LineError.js +5 -7
  81. package/dist/Errors/catalog/LineError.js.map +1 -1
  82. package/dist/Errors/index.js +7 -0
  83. package/dist/Errors/index.js.map +1 -1
  84. package/dist/Errors/types.js +15 -20
  85. package/dist/Errors/types.js.map +1 -1
  86. package/dist/Events/impl/index.js +2 -3
  87. package/dist/Events/impl/index.js.map +1 -1
  88. package/dist/Events/types.js +44 -52
  89. package/dist/Events/types.js.map +1 -1
  90. package/dist/Logger/index.js +1 -2
  91. package/dist/Logger/index.js.map +1 -1
  92. package/dist/Logger/index.test.js.map +1 -1
  93. package/dist/Logger/types.js +9 -12
  94. package/dist/Logger/types.js.map +1 -1
  95. package/dist/Metrics/index.js +2 -4
  96. package/dist/Metrics/index.js.map +1 -1
  97. package/dist/Metrics/index.test.js +3 -3
  98. package/dist/Metrics/index.test.js.map +1 -1
  99. package/dist/Metrics/types.js +15 -20
  100. package/dist/Metrics/types.js.map +1 -1
  101. package/dist/SDKConnector/index.js +1 -2
  102. package/dist/SDKConnector/index.js.map +1 -1
  103. package/dist/SDKConnector/types.js.map +1 -1
  104. package/dist/SDKConnector/utils.js +1 -2
  105. package/dist/SDKConnector/utils.js.map +1 -1
  106. package/dist/Voicemail/BroadworksBackendConnector.js +21 -12
  107. package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
  108. package/dist/Voicemail/BroadworksBackendConnector.test.js +2 -2
  109. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
  110. package/dist/Voicemail/UcmBackendConnector.js +19 -11
  111. package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
  112. package/dist/Voicemail/UcmBackendConnector.test.js +5 -4
  113. package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
  114. package/dist/Voicemail/Voicemail.js +35 -33
  115. package/dist/Voicemail/Voicemail.js.map +1 -1
  116. package/dist/Voicemail/Voicemail.test.js.map +1 -1
  117. package/dist/Voicemail/WxCallBackendConnector.js +18 -11
  118. package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
  119. package/dist/Voicemail/WxCallBackendConnector.test.js +4 -4
  120. package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
  121. package/dist/Voicemail/constants.js +29 -58
  122. package/dist/Voicemail/constants.js.map +1 -1
  123. package/dist/Voicemail/types.js.map +1 -1
  124. package/dist/Voicemail/voicemailFixture.js +35 -70
  125. package/dist/Voicemail/voicemailFixture.js.map +1 -1
  126. package/dist/api.js +13 -20
  127. package/dist/api.js.map +1 -1
  128. package/dist/common/Utils.js +18 -25
  129. package/dist/common/Utils.js.map +1 -1
  130. package/dist/common/Utils.test.js +3 -3
  131. package/dist/common/Utils.test.js.map +1 -1
  132. package/dist/common/constants.js +41 -82
  133. package/dist/common/constants.js.map +1 -1
  134. package/dist/common/testUtil.js +12 -21
  135. package/dist/common/testUtil.js.map +1 -1
  136. package/dist/common/types.js +34 -43
  137. package/dist/common/types.js.map +1 -1
  138. package/dist/index.js +246 -0
  139. package/dist/index.js.map +1 -1
  140. package/dist/module/CallHistory/CallHistory.js +7 -5
  141. package/dist/module/CallHistory/callHistoryFixtures.js +59 -0
  142. package/dist/module/CallSettings/UcmBackendConnector.js +4 -4
  143. package/dist/module/CallingClient/CallingClient.js +59 -42
  144. package/dist/module/CallingClient/calling/CallerId/index.js +3 -23
  145. package/dist/module/CallingClient/calling/call.js +69 -26
  146. package/dist/module/CallingClient/calling/callManager.js +0 -6
  147. package/dist/module/CallingClient/callingClientFixtures.js +119 -1
  148. package/dist/module/CallingClient/constants.js +8 -4
  149. package/dist/module/CallingClient/line/index.js +9 -12
  150. package/dist/module/CallingClient/line/types.js +0 -5
  151. package/dist/module/CallingClient/registration/register.js +28 -20
  152. package/dist/module/Errors/catalog/CallingDeviceError.js +2 -2
  153. package/dist/module/Errors/catalog/LineError.js +2 -2
  154. package/dist/module/Errors/index.js +1 -0
  155. package/dist/module/Events/types.js +2 -0
  156. package/dist/module/common/Utils.js +14 -19
  157. package/dist/module/common/testUtil.js +2 -1
  158. package/dist/module/common/types.js +6 -5
  159. package/dist/module/index.js +9 -0
  160. package/dist/types/CallHistory/CallHistory.d.ts +2 -1
  161. package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
  162. package/dist/types/CallHistory/callHistoryFixtures.d.ts +1 -0
  163. package/dist/types/CallHistory/callHistoryFixtures.d.ts.map +1 -1
  164. package/dist/types/CallSettings/UcmBackendConnector.d.ts +1 -1
  165. package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
  166. package/dist/types/CallSettings/types.d.ts +1 -0
  167. package/dist/types/CallSettings/types.d.ts.map +1 -1
  168. package/dist/types/CallingClient/CallingClient.d.ts +2 -0
  169. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  170. package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -1
  171. package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
  172. package/dist/types/CallingClient/calling/call.d.ts +2 -0
  173. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  174. package/dist/types/CallingClient/calling/callManager.d.ts +0 -1
  175. package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
  176. package/dist/types/CallingClient/calling/types.d.ts +30 -30
  177. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  178. package/dist/types/CallingClient/callingClientFixtures.d.ts +69 -1
  179. package/dist/types/CallingClient/callingClientFixtures.d.ts.map +1 -1
  180. package/dist/types/CallingClient/constants.d.ts +7 -3
  181. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  182. package/dist/types/CallingClient/line/index.d.ts +6 -6
  183. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  184. package/dist/types/CallingClient/line/types.d.ts +11 -23
  185. package/dist/types/CallingClient/line/types.d.ts.map +1 -1
  186. package/dist/types/CallingClient/registration/register.d.ts +3 -3
  187. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  188. package/dist/types/CallingClient/registration/types.d.ts +14 -14
  189. package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
  190. package/dist/types/CallingClient/types.d.ts +6 -4
  191. package/dist/types/CallingClient/types.d.ts.map +1 -1
  192. package/dist/types/Contacts/ContactsClient.d.ts +1 -1
  193. package/dist/types/Errors/catalog/CallingDeviceError.d.ts +4 -4
  194. package/dist/types/Errors/catalog/CallingDeviceError.d.ts.map +1 -1
  195. package/dist/types/Errors/catalog/LineError.d.ts +4 -4
  196. package/dist/types/Errors/catalog/LineError.d.ts.map +1 -1
  197. package/dist/types/Errors/index.d.ts +1 -0
  198. package/dist/types/Errors/index.d.ts.map +1 -1
  199. package/dist/types/Errors/types.d.ts +2 -3
  200. package/dist/types/Errors/types.d.ts.map +1 -1
  201. package/dist/types/Events/types.d.ts +28 -5
  202. package/dist/types/Events/types.d.ts.map +1 -1
  203. package/dist/types/SDKConnector/types.d.ts +2 -1
  204. package/dist/types/SDKConnector/types.d.ts.map +1 -1
  205. package/dist/types/Voicemail/UcmBackendConnector.d.ts +1 -1
  206. package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
  207. package/dist/types/Voicemail/WxCallBackendConnector.d.ts +1 -1
  208. package/dist/types/Voicemail/types.d.ts +10 -10
  209. package/dist/types/Voicemail/types.d.ts.map +1 -1
  210. package/dist/types/api.d.ts +4 -5
  211. package/dist/types/api.d.ts.map +1 -1
  212. package/dist/types/common/Utils.d.ts.map +1 -1
  213. package/dist/types/common/testUtil.d.ts +1 -0
  214. package/dist/types/common/testUtil.d.ts.map +1 -1
  215. package/dist/types/common/types.d.ts +3 -2
  216. package/dist/types/common/types.d.ts.map +1 -1
  217. package/dist/types/index.d.ts +13 -0
  218. package/dist/types/index.d.ts.map +1 -1
  219. package/package.json +3 -3
@@ -22,23 +22,24 @@ var _types2 = require("../common/types");
22
22
  var _types3 = require("../Events/types");
23
23
  var _Logger = _interopRequireDefault(require("../Logger"));
24
24
  var _CallingClient = require("./CallingClient");
25
- var utils = _interopRequireWildcard(require("../common/Utils"));
25
+ var _Utils = _interopRequireWildcard(require("../common/Utils"));
26
+ var utils = _Utils;
26
27
  var _callManager = require("./calling/callManager");
27
28
  var _constants = require("./constants");
28
29
  var _callRecordFixtures = require("./callRecordFixtures");
29
- var _types4 = require("./line/types");
30
30
  var _callingClientFixtures = require("./callingClientFixtures");
31
31
  var _line = _interopRequireDefault(require("./line"));
32
32
  var _registerFixtures = require("./registration/registerFixtures");
33
- function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
34
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
33
+ function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
34
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
35
+ function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
36
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable dot-notation */
37
37
  describe('CallingClient Tests', function () {
38
38
  // Common initializers
39
39
 
40
40
  var handleErrorSpy = jest.spyOn(utils, 'handleCallingClientErrors');
41
41
  var webex = (0, _testUtil.getTestUtilsWebex)();
42
+ webex.internal.services['_hostCatalog'] = _callingClientFixtures.mockCatalogUS;
42
43
  var defaultServiceIndicator = _types2.ServiceIndicator.CALLING;
43
44
  var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
44
45
  var logSpy = jest.spyOn(_Logger.default, 'info');
@@ -378,7 +379,7 @@ describe('CallingClient Tests', function () {
378
379
  expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({
379
380
  method: 'GET'
380
381
  }, (0, _testUtil.getMockRequestTemplate)()), {}, {
381
- uri: "".concat(_callingClientFixtures.uri, "myip")
382
+ uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT).concat(_constants.IP_ENDPOINT)
382
383
  }));
383
384
  expect(webex.request).nthCalledWith(2, {
384
385
  method: 'GET',
@@ -389,7 +390,7 @@ describe('CallingClient Tests', function () {
389
390
  expect(webex.request).nthCalledWith(3, _objectSpread(_objectSpread({
390
391
  method: 'GET'
391
392
  }, (0, _testUtil.getMockRequestTemplate)()), {}, {
392
- uri: "".concat(_callingClientFixtures.uri, "?regionCode=").concat(_callingClientFixtures.regionBody.clientRegion, "&countryCode=").concat(_callingClientFixtures.regionBody.countryCode)
393
+ uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT, "?regionCode=").concat(_callingClientFixtures.regionBody.clientRegion, "&countryCode=").concat(_callingClientFixtures.regionBody.countryCode)
393
394
  }));
394
395
  case 10:
395
396
  case "end":
@@ -414,22 +415,29 @@ describe('CallingClient Tests', function () {
414
415
  });
415
416
  case 4:
416
417
  callingClient = _context14.sent;
417
- expect(handleErrorSpy).toBeCalledOnceWith(failurePayload, expect.anything(), {
418
- file: _constants.CALLING_CLIENT_FILE,
419
- method: 'getMobiusServers'
420
- });
421
- expect(webex.request).toBeCalledOnceWith(_objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
422
- uri: "".concat(_callingClientFixtures.uri, "myip"),
418
+ expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
419
+ uri: 'https://mobius-us-east-1.prod.infra.webex.com/api/v1/calling/web/myip',
423
420
  method: 'GET'
424
421
  }));
425
- expect(callingClient.primaryMobiusUris).toEqual([_callingClientFixtures.uri]);
426
- expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({
422
+ expect(webex.request).nthCalledWith(2, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
423
+ uri: 'https://mobius-ca-central-1.prod.infra.webex.com/api/v1/calling/web/myip',
427
424
  method: 'GET'
428
- }, (0, _testUtil.getMockRequestTemplate)()), {}, {
429
- uri: "".concat(_callingClientFixtures.uri, "myip")
430
425
  }));
431
- expect(warnSpy).toBeCalledWith('Error in finding Mobius Servers. Will use the default URL.', '');
432
- case 10:
426
+ expect(webex.request).nthCalledWith(3, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
427
+ uri: 'https://mobius-eu-central-1.prod.infra.webex.com/api/v1/calling/web/myip',
428
+ method: 'GET'
429
+ }));
430
+ expect(webex.request).nthCalledWith(4, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
431
+ uri: 'https://mobius-ap-southeast-2.prod.infra.webex.com/api/v1/calling/web/myip',
432
+ method: 'GET'
433
+ }));
434
+ expect(handleErrorSpy).toBeCalledWith(failurePayload, expect.anything(), {
435
+ file: _constants.CALLING_CLIENT_FILE,
436
+ method: 'getMobiusServers'
437
+ });
438
+ expect(callingClient.primaryMobiusUris).toEqual(["".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT)]);
439
+ expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
440
+ case 12:
433
441
  case "end":
434
442
  return _context14.stop();
435
443
  }
@@ -457,11 +465,11 @@ describe('CallingClient Tests', function () {
457
465
  method: 'getMobiusServers'
458
466
  });
459
467
  expect(webex.request).toBeCalledTimes(3);
460
- expect(callingClient.primaryMobiusUris).toEqual([_callingClientFixtures.uri]);
468
+ expect(callingClient.primaryMobiusUris).toEqual(["".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT)]);
461
469
  expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({
462
470
  method: 'GET'
463
471
  }, (0, _testUtil.getMockRequestTemplate)()), {}, {
464
- uri: "".concat(_callingClientFixtures.uri, "myip")
472
+ uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT).concat(_constants.IP_ENDPOINT)
465
473
  }));
466
474
  expect(webex.request).nthCalledWith(2, {
467
475
  method: 'GET',
@@ -469,7 +477,7 @@ describe('CallingClient Tests', function () {
469
477
  addAuthHeader: false,
470
478
  headers: (0, _defineProperty2.default)({}, _constants.SPARK_USER_AGENT, null)
471
479
  });
472
- expect(warnSpy).toBeCalledWith('Error in finding Mobius Servers. Will use the default URL.', '');
480
+ expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
473
481
  case 11:
474
482
  case "end":
475
483
  return _context15.stop();
@@ -501,7 +509,7 @@ describe('CallingClient Tests', function () {
501
509
  method: 'getMobiusServers'
502
510
  });
503
511
  expect(webex.request).toBeCalledOnceWith(_objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
504
- uri: "".concat(_callingClientFixtures.uri, "?regionCode=").concat(_callingClientFixtures.regionBody.clientRegion, "&countryCode=").concat(_callingClientFixtures.regionBody.countryCode),
512
+ uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT, "?regionCode=").concat(_callingClientFixtures.regionBody.clientRegion, "&countryCode=").concat(_callingClientFixtures.regionBody.countryCode),
505
513
  method: 'GET'
506
514
  }));
507
515
  expect(handleErrorSpy).not.toBeCalled();
@@ -512,43 +520,101 @@ describe('CallingClient Tests', function () {
512
520
  }, _callee16);
513
521
  })));
514
522
  });
523
+ describe('Testing each cluster present withing host catalog', function () {
524
+ var mobiusCluster = ['mobius-eu-central-1.prod.infra.webex.com', 'mobius-us-east-1.int.infra.webex.com', 'mobius-eu-central-1.int.infra.webex.com'];
525
+ var checkCluster = /*#__PURE__*/function () {
526
+ var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(mockServiceHosts, mockCatalog) {
527
+ var callingClient;
528
+ return _regenerator.default.wrap(function _callee17$(_context17) {
529
+ while (1) switch (_context17.prev = _context17.next) {
530
+ case 0:
531
+ webex.internal.services._hostCatalog = mockCatalog;
532
+ _context17.next = 3;
533
+ return (0, _CallingClient.createClient)(webex, {
534
+ logger: {
535
+ level: _types.LOGGER.INFO
536
+ }
537
+ });
538
+ case 3:
539
+ callingClient = _context17.sent;
540
+ expect(callingClient['mobiusClusters']).toStrictEqual(mockServiceHosts);
541
+ case 5:
542
+ case "end":
543
+ return _context17.stop();
544
+ }
545
+ }, _callee17);
546
+ }));
547
+ return function checkCluster(_x, _x2) {
548
+ return _ref17.apply(this, arguments);
549
+ };
550
+ }();
551
+ it.each(mobiusCluster)('%s', /*#__PURE__*/function () {
552
+ var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(clusterName) {
553
+ return _regenerator.default.wrap(function _callee18$(_context18) {
554
+ while (1) switch (_context18.prev = _context18.next) {
555
+ case 0:
556
+ _context18.t0 = clusterName;
557
+ _context18.next = _context18.t0 === 'mobius-eu-central-1.prod.infra.webex.com' ? 3 : _context18.t0 === 'mobius-us-east-1.int.infra.webex.com' ? 5 : _context18.t0 === 'mobius-eu-central-1.int.infra.webex.com' ? 7 : 9;
558
+ break;
559
+ case 3:
560
+ checkCluster(_callingClientFixtures.mockEUServiceHosts, _callingClientFixtures.mockCatalogEU);
561
+ return _context18.abrupt("break", 10);
562
+ case 5:
563
+ checkCluster(_callingClientFixtures.mockIntServiceHosts, _callingClientFixtures.mockCatalogUSInt);
564
+ return _context18.abrupt("break", 10);
565
+ case 7:
566
+ checkCluster(_callingClientFixtures.mockEUIntServiceHosts, _callingClientFixtures.mockCatalogEUInt);
567
+ return _context18.abrupt("break", 10);
568
+ case 9:
569
+ return _context18.abrupt("break", 10);
570
+ case 10:
571
+ case "end":
572
+ return _context18.stop();
573
+ }
574
+ }, _callee18);
575
+ }));
576
+ return function (_x3) {
577
+ return _ref18.apply(this, arguments);
578
+ };
579
+ }());
580
+ });
515
581
  describe('Network activity detection tests', function () {
516
582
  var callingClient;
517
583
  var line;
518
584
  var reg;
519
- var deRegSpy;
520
585
  var restoreSpy;
586
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
587
+ var deRegSpy;
521
588
  var restartRegisterSpy;
522
589
  var registerSpy;
523
- beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
524
- return _regenerator.default.wrap(function _callee17$(_context17) {
525
- while (1) switch (_context17.prev = _context17.next) {
590
+ beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
591
+ return _regenerator.default.wrap(function _callee19$(_context19) {
592
+ while (1) switch (_context19.prev = _context19.next) {
526
593
  case 0:
527
594
  jest.useFakeTimers();
528
595
  webex.request.mockResolvedValueOnce(_callingClientFixtures.ipPayload).mockResolvedValueOnce(_callingClientFixtures.regionPayload).mockResolvedValueOnce(_callingClientFixtures.discoveryPayload).mockResolvedValueOnce(_callingClientFixtures.registrationPayload);
529
- _context17.next = 4;
596
+ _context19.next = 4;
530
597
  return (0, _CallingClient.createClient)(webex, {
531
598
  logger: {
532
599
  level: _types.LOGGER.INFO
533
600
  }
534
601
  });
535
602
  case 4:
536
- callingClient = _context17.sent;
603
+ callingClient = _context19.sent;
537
604
  line = (0, _values.default)(callingClient.lineDict)[0];
538
605
  reg = line.registration;
539
- expect(line.getRegistrationStatus()).toEqual(_types2.MobiusStatus.DEFAULT);
540
- _context17.next = 10;
606
+ _context19.next = 9;
541
607
  return line.register();
542
- case 10:
608
+ case 9:
543
609
  deRegSpy = jest.spyOn(line.registration, 'deregister');
544
610
  restoreSpy = jest.spyOn(reg, 'restorePreviousRegistration');
545
611
  restartRegisterSpy = jest.spyOn(reg, 'restartRegistration');
546
612
  registerSpy = jest.spyOn(reg, 'attemptRegistrationWithServers');
547
- case 14:
613
+ case 13:
548
614
  case "end":
549
- return _context17.stop();
615
+ return _context19.stop();
550
616
  }
551
- }, _callee17);
617
+ }, _callee19);
552
618
  })));
553
619
  afterEach(function () {
554
620
  jest.clearAllTimers();
@@ -558,18 +624,18 @@ describe('CallingClient Tests', function () {
558
624
  callingClient = undefined;
559
625
  jest.useRealTimers();
560
626
  });
561
- it('detect a network flap in mercury connection', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
562
- return _regenerator.default.wrap(function _callee18$(_context18) {
563
- while (1) switch (_context18.prev = _context18.next) {
627
+ it('detect a network flap in mercury connection', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
628
+ return _regenerator.default.wrap(function _callee20$(_context20) {
629
+ while (1) switch (_context20.prev = _context20.next) {
564
630
  case 0:
565
- expect(line.getRegistrationStatus()).toEqual(_types2.MobiusStatus.ACTIVE);
631
+ expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
566
632
 
567
633
  /* Set mercury connection to be down and execute a delay of 2.5 seconds */
568
634
  webex.internal.mercury.connected = false;
569
635
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
570
636
 
571
637
  /* We should be detecting the network flap */
572
- expect(warnSpy).toBeCalledWith('Network has flapped, waiting for mercury connection to be up', {
638
+ expect(warnSpy).toBeCalledOnceWith('Network has flapped, waiting for mercury connection to be up', {
573
639
  file: _constants.CALLING_CLIENT_FILE,
574
640
  method: _constants.NETWORK_CHANGE_DETECTION_UTIL
575
641
  });
@@ -577,32 +643,31 @@ describe('CallingClient Tests', function () {
577
643
  /* Set mercury connection to be up and execute a delay of 2.5 seconds */
578
644
  webex.internal.mercury.connected = true;
579
645
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
580
- _context18.next = 8;
646
+ _context20.next = 8;
581
647
  return flushPromises();
582
648
  case 8:
583
649
  /* We should be detecting the network recovery */
584
- expect(logSpy).nthCalledWith(7, 'Mercury connection is up again, Re-registering with Mobius', {
650
+ expect(logSpy).toBeCalledWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
585
651
  file: _constants.REGISTRATION_FILE,
586
652
  method: 'handleConnectionRestoration'
587
653
  });
588
- expect(deRegSpy).toBeCalledWith();
589
654
  expect(restoreSpy).toBeCalledWith('handleConnectionRestoration');
590
655
  expect(restartRegisterSpy).toBeCalledWith('handleConnectionRestoration');
591
656
  expect(webex.request).toBeCalledTimes(6);
592
657
  expect(registerSpy).toBeCalledWith('handleConnectionRestoration', [reg.getActiveMobiusUrl()]);
593
658
  expect(registerSpy).lastCalledWith('handleConnectionRestoration', [_callingClientFixtures.primaryUrl]);
594
- case 15:
659
+ case 14:
595
660
  case "end":
596
- return _context18.stop();
661
+ return _context20.stop();
597
662
  }
598
- }, _callee18);
663
+ }, _callee20);
599
664
  })));
600
- it('Simulate a network flap with no active calls and re-verify registration: Restore Failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
665
+ it('Simulate a network flap with no active calls and re-verify registration: Restore Failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
601
666
  var failurePayload, mockRegistrationBody, successPayload;
602
- return _regenerator.default.wrap(function _callee19$(_context19) {
603
- while (1) switch (_context19.prev = _context19.next) {
667
+ return _regenerator.default.wrap(function _callee21$(_context21) {
668
+ while (1) switch (_context21.prev = _context21.next) {
604
669
  case 0:
605
- expect(line.getRegistrationStatus()).toEqual(_types2.MobiusStatus.ACTIVE);
670
+ expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
606
671
  failurePayload = {
607
672
  statusCode: 500,
608
673
  body: ''
@@ -627,41 +692,39 @@ describe('CallingClient Tests', function () {
627
692
  /* Set mercury connection to be up and execute a delay of 2.5 seconds */
628
693
  webex.internal.mercury.connected = true;
629
694
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
630
- _context19.next = 12;
695
+ _context21.next = 12;
631
696
  return flushPromises();
632
697
  case 12:
633
698
  /* We should be detecting the network recovery */
634
- expect(logSpy).toBeCalledWith('Mercury connection is up again, Re-registering with Mobius', {
699
+ expect(logSpy).toBeCalledWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
635
700
  file: _constants.REGISTRATION_FILE,
636
701
  method: 'handleConnectionRestoration'
637
702
  });
638
- expect(deRegSpy).toBeCalledWith();
639
- expect(restoreSpy).toBeCalledWith('handleConnectionRestoration');
640
- expect(restartRegisterSpy).toBeCalledWith('handleConnectionRestoration');
703
+ expect(restoreSpy).toBeCalledOnceWith('handleConnectionRestoration');
704
+ expect(restartRegisterSpy).toBeCalledOnceWith('handleConnectionRestoration');
641
705
  expect(webex.request).toBeCalledTimes(6);
642
706
  expect(registerSpy).toBeCalledWith('handleConnectionRestoration', [reg.getActiveMobiusUrl()]);
643
707
  expect(registerSpy).lastCalledWith('handleConnectionRestoration', [_callingClientFixtures.primaryUrl]);
644
- case 19:
708
+ case 18:
645
709
  case "end":
646
- return _context19.stop();
710
+ return _context21.stop();
647
711
  }
648
- }, _callee19);
712
+ }, _callee21);
649
713
  })));
650
- it('Simulate a network flap before initial registration is done', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
651
- return _regenerator.default.wrap(function _callee20$(_context20) {
652
- while (1) switch (_context20.prev = _context20.next) {
714
+ it('Simulate a network flap before initial registration is done', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
715
+ var handleConnectionRestoreSpy;
716
+ return _regenerator.default.wrap(function _callee22$(_context22) {
717
+ while (1) switch (_context22.prev = _context22.next) {
653
718
  case 0:
654
- expect(line.getRegistrationStatus()).toEqual(_types2.MobiusStatus.ACTIVE);
655
- reg.deregister();
656
- reg.setActiveMobiusUrl(undefined);
657
- jest.clearAllMocks();
719
+ handleConnectionRestoreSpy = jest.spyOn(reg, 'handleConnectionRestoration');
720
+ reg.setStatus(_types2.RegistrationStatus.IDLE);
658
721
 
659
722
  /* Set mercury connection to be down and execute a delay of 2.5 seconds */
660
723
  webex.internal.mercury.connected = false;
661
724
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
662
725
 
663
726
  /* We should be detecting the network flap */
664
- expect(warnSpy).toBeCalledWith('Network has flapped, waiting for mercury connection to be up', {
727
+ expect(warnSpy).toBeCalledOnceWith('Network has flapped, waiting for mercury connection to be up', {
665
728
  file: _constants.CALLING_CLIENT_FILE,
666
729
  method: _constants.NETWORK_CHANGE_DETECTION_UTIL
667
730
  });
@@ -669,11 +732,11 @@ describe('CallingClient Tests', function () {
669
732
  /* Set mercury connection to be up and execute a delay of 2.5 seconds */
670
733
  webex.internal.mercury.connected = true;
671
734
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
672
- _context20.next = 11;
735
+ _context22.next = 9;
673
736
  return flushPromises();
674
- case 11:
737
+ case 9:
675
738
  /* We should be detecting the network recovery */
676
- expect(logSpy).toBeCalledWith('Mercury connection is up again, Re-registering with Mobius', {
739
+ expect(logSpy).not.toBeCalledWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
677
740
  file: _constants.REGISTRATION_FILE,
678
741
  method: 'handleConnectionRestoration'
679
742
  });
@@ -682,20 +745,18 @@ describe('CallingClient Tests', function () {
682
745
  * When initial registration is not done, network flap
683
746
  * will not trigger de-registration/registration
684
747
  */
685
- expect(webex.request).not.toBeCalled();
686
- expect(restoreSpy).not.toBeCalled();
687
- expect(registerSpy).not.toBeCalled();
688
- case 15:
748
+ expect(handleConnectionRestoreSpy).not.toBeCalledOnceWith();
749
+ case 11:
689
750
  case "end":
690
- return _context20.stop();
751
+ return _context22.stop();
691
752
  }
692
- }, _callee20);
753
+ }, _callee22);
693
754
  })));
694
- it('Simulate a network flap with 1 active call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
695
- return _regenerator.default.wrap(function _callee21$(_context21) {
696
- while (1) switch (_context21.prev = _context21.next) {
755
+ it('Simulate a network flap with 1 active call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
756
+ return _regenerator.default.wrap(function _callee23$(_context23) {
757
+ while (1) switch (_context23.prev = _context23.next) {
697
758
  case 0:
698
- expect(line.getRegistrationStatus()).toEqual(_types2.MobiusStatus.ACTIVE);
759
+ expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
699
760
 
700
761
  /** create a new call */
701
762
  reg.callManager.createCall();
@@ -704,11 +765,11 @@ describe('CallingClient Tests', function () {
704
765
  /* Set mercury connection to be down and execute a delay of 2.5 seconds */
705
766
  webex.internal.mercury.connected = false;
706
767
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
707
- _context21.next = 7;
768
+ _context23.next = 7;
708
769
  return flushPromises();
709
770
  case 7:
710
771
  /* We should be detecting the network flap */
711
- expect(warnSpy).not.toBeCalledWith('Network has flapped, waiting for mercury connection to be up', {
772
+ expect(warnSpy).not.toBeCalledOnceWith('Network has flapped, waiting for mercury connection to be up', {
712
773
  file: _constants.CALLING_CLIENT_FILE,
713
774
  method: 'handleConnectionRestoration'
714
775
  });
@@ -716,39 +777,39 @@ describe('CallingClient Tests', function () {
716
777
  /* Set mercury connection to be up and execute a delay of 2.5 seconds */
717
778
  webex.internal.mercury.connected = true;
718
779
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
719
- _context21.next = 12;
780
+ _context23.next = 12;
720
781
  return flushPromises();
721
782
  case 12:
722
783
  /* We should be detecting the network recovery */
723
- expect(logSpy).not.toBeCalledWith('Mercury connection is up again, Re-registering with Mobius', {
784
+ expect(logSpy).not.toBeCalledOnceWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
724
785
  file: _constants.REGISTRATION_FILE,
725
786
  method: 'handleConnectionRestoration'
726
787
  });
727
788
  expect(registerSpy).not.toBeCalledWith(true);
728
789
  case 14:
729
790
  case "end":
730
- return _context21.stop();
791
+ return _context23.stop();
731
792
  }
732
- }, _callee21);
793
+ }, _callee23);
733
794
  })));
734
795
  });
735
796
  describe('Line creation tests', function () {
736
797
  var callingClient;
737
798
  var line;
738
- beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
739
- return _regenerator.default.wrap(function _callee22$(_context22) {
740
- while (1) switch (_context22.prev = _context22.next) {
799
+ beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
800
+ return _regenerator.default.wrap(function _callee24$(_context24) {
801
+ while (1) switch (_context24.prev = _context24.next) {
741
802
  case 0:
742
- _context22.next = 2;
803
+ _context24.next = 2;
743
804
  return (0, _CallingClient.createClient)(webex);
744
805
  case 2:
745
- callingClient = _context22.sent;
806
+ callingClient = _context24.sent;
746
807
  line = (0, _values.default)(callingClient.lineDict)[0];
747
808
  case 4:
748
809
  case "end":
749
- return _context22.stop();
810
+ return _context24.stop();
750
811
  }
751
- }, _callee22);
812
+ }, _callee24);
752
813
  })));
753
814
  afterEach(function () {
754
815
  jest.clearAllTimers();
@@ -774,7 +835,7 @@ describe('CallingClient Tests', function () {
774
835
  var mutex = new _asyncMutex.Mutex();
775
836
  var userId = webex.internal.device.userId;
776
837
  var clientDeviceUri = webex.internal.device.url;
777
- var mobiusUris = (0, utils.filterMobiusUris)((0, _testUtil.getMobiusDiscoveryResponse)(), _registerFixtures.URL);
838
+ var mobiusUris = (0, _Utils.filterMobiusUris)((0, _testUtil.getMobiusDiscoveryResponse)(), _registerFixtures.URL);
778
839
  var primaryMobiusUris = jest.fn(function () {
779
840
  return mobiusUris.primary;
780
841
  });
@@ -783,25 +844,25 @@ describe('CallingClient Tests', function () {
783
844
  });
784
845
  var callingClient;
785
846
  var line;
786
- beforeAll( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
847
+ beforeAll( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
787
848
  var calls;
788
- return _regenerator.default.wrap(function _callee23$(_context23) {
789
- while (1) switch (_context23.prev = _context23.next) {
849
+ return _regenerator.default.wrap(function _callee25$(_context25) {
850
+ while (1) switch (_context25.prev = _context25.next) {
790
851
  case 0:
791
- _context23.next = 2;
852
+ _context25.next = 2;
792
853
  return (0, _CallingClient.createClient)(webex);
793
854
  case 2:
794
- callingClient = _context23.sent;
795
- line = new _line.default(userId, clientDeviceUri, _types4.LineStatus.ACTIVE, mutex, primaryMobiusUris(), backupMobiusUris(), _types.LOGGER.INFO);
855
+ callingClient = _context25.sent;
856
+ line = new _line.default(userId, clientDeviceUri, mutex, primaryMobiusUris(), backupMobiusUris(), _types.LOGGER.INFO);
796
857
  calls = (0, _values.default)(callManager.getActiveCalls());
797
858
  calls.forEach(function (call) {
798
859
  call.end();
799
860
  });
800
861
  case 6:
801
862
  case "end":
802
- return _context23.stop();
863
+ return _context25.stop();
803
864
  }
804
- }, _callee23);
865
+ }, _callee25);
805
866
  })));
806
867
  afterAll(function () {
807
868
  callingClient.removeAllListeners();
@@ -884,23 +945,23 @@ describe('CallingClient Tests', function () {
884
945
  describe('Call Session Event test', function () {
885
946
  var mockOn = webex.internal.mercury.on;
886
947
  var callingClient;
887
- beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
888
- return _regenerator.default.wrap(function _callee24$(_context24) {
889
- while (1) switch (_context24.prev = _context24.next) {
948
+ beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
949
+ return _regenerator.default.wrap(function _callee26$(_context26) {
950
+ while (1) switch (_context26.prev = _context26.next) {
890
951
  case 0:
891
- _context24.next = 2;
952
+ _context26.next = 2;
892
953
  return (0, _CallingClient.createClient)(webex, {
893
954
  logger: {
894
955
  level: _types.LOGGER.INFO
895
956
  }
896
957
  });
897
958
  case 2:
898
- callingClient = _context24.sent;
959
+ callingClient = _context26.sent;
899
960
  case 3:
900
961
  case "end":
901
- return _context24.stop();
962
+ return _context26.stop();
902
963
  }
903
- }, _callee24);
964
+ }, _callee26);
904
965
  })));
905
966
  afterEach(function () {
906
967
  callingClient.removeAllListeners();