@webex/plugin-meetings 3.9.0-next.2 → 3.9.0-next.21

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 (87) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +2 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/interpretation/index.js +1 -1
  6. package/dist/interpretation/siLanguage.js +1 -1
  7. package/dist/locus-info/index.js +38 -10
  8. package/dist/locus-info/index.js.map +1 -1
  9. package/dist/locus-info/parser.js +4 -1
  10. package/dist/locus-info/parser.js.map +1 -1
  11. package/dist/media/properties.js +53 -5
  12. package/dist/media/properties.js.map +1 -1
  13. package/dist/meeting/in-meeting-actions.js +2 -0
  14. package/dist/meeting/in-meeting-actions.js.map +1 -1
  15. package/dist/meeting/index.js +189 -122
  16. package/dist/meeting/index.js.map +1 -1
  17. package/dist/meeting/muteState.js +2 -5
  18. package/dist/meeting/muteState.js.map +1 -1
  19. package/dist/meeting/request.js +25 -0
  20. package/dist/meeting/request.js.map +1 -1
  21. package/dist/meeting/util.js +30 -11
  22. package/dist/meeting/util.js.map +1 -1
  23. package/dist/meeting-info/meeting-info-v2.js +29 -21
  24. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  25. package/dist/meetings/index.js +31 -25
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/member/types.js.map +1 -1
  28. package/dist/members/collection.js +13 -0
  29. package/dist/members/collection.js.map +1 -1
  30. package/dist/members/index.js +42 -20
  31. package/dist/members/index.js.map +1 -1
  32. package/dist/members/util.js +7 -2
  33. package/dist/members/util.js.map +1 -1
  34. package/dist/metrics/constants.js +2 -1
  35. package/dist/metrics/constants.js.map +1 -1
  36. package/dist/reachability/index.js +3 -3
  37. package/dist/reachability/index.js.map +1 -1
  38. package/dist/types/constants.d.ts +2 -0
  39. package/dist/types/locus-info/index.d.ts +54 -1
  40. package/dist/types/media/properties.d.ts +21 -0
  41. package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
  42. package/dist/types/meeting/index.d.ts +11 -1
  43. package/dist/types/meeting/request.d.ts +9 -0
  44. package/dist/types/meeting/util.d.ts +10 -3
  45. package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
  46. package/dist/types/meetings/index.d.ts +3 -1
  47. package/dist/types/member/types.d.ts +1 -0
  48. package/dist/types/members/collection.d.ts +6 -0
  49. package/dist/types/members/index.d.ts +12 -2
  50. package/dist/types/members/util.d.ts +6 -3
  51. package/dist/types/metrics/constants.d.ts +1 -0
  52. package/dist/webinar/index.js +1 -1
  53. package/package.json +17 -17
  54. package/src/constants.ts +2 -0
  55. package/src/locus-info/index.ts +84 -9
  56. package/src/locus-info/parser.ts +5 -1
  57. package/src/media/properties.ts +43 -0
  58. package/src/meeting/in-meeting-actions.ts +4 -0
  59. package/src/meeting/index.ts +91 -4
  60. package/src/meeting/muteState.ts +2 -6
  61. package/src/meeting/request.ts +23 -0
  62. package/src/meeting/util.ts +41 -20
  63. package/src/meeting-info/meeting-info-v2.ts +24 -5
  64. package/src/meetings/index.ts +9 -3
  65. package/src/member/types.ts +1 -0
  66. package/src/members/collection.ts +11 -0
  67. package/src/members/index.ts +38 -5
  68. package/src/members/util.ts +18 -2
  69. package/src/metrics/constants.ts +1 -0
  70. package/src/reachability/index.ts +3 -3
  71. package/test/unit/spec/common/browser-detection.js +0 -24
  72. package/test/unit/spec/locus-info/index.js +30 -15
  73. package/test/unit/spec/locus-info/parser.js +3 -2
  74. package/test/unit/spec/media/properties.ts +137 -0
  75. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
  76. package/test/unit/spec/meeting/index.js +255 -27
  77. package/test/unit/spec/meeting/muteState.js +32 -6
  78. package/test/unit/spec/meeting/request.js +21 -0
  79. package/test/unit/spec/meeting/utils.js +45 -16
  80. package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
  81. package/test/unit/spec/meetings/index.js +10 -5
  82. package/test/unit/spec/members/collection.js +120 -0
  83. package/test/unit/spec/members/index.js +72 -3
  84. package/test/unit/spec/members/request.js +55 -0
  85. package/test/unit/spec/members/utils.js +116 -14
  86. package/test/unit/spec/reachability/index.ts +158 -3
  87. package/test/unit/spec/roap/turnDiscovery.ts +3 -3
@@ -320,9 +320,18 @@ describe('plugin-meetings', () => {
320
320
  EVENT_TRIGGERS.MEMBERS_CLEAR,
321
321
  {}
322
322
  );
323
+ sinon.restore();
323
324
  });
324
325
  });
325
326
  describe('#locusParticipantsUpdate', () => {
327
+ beforeEach(() => {
328
+ sinon.stub(Trigger, 'trigger');
329
+ });
330
+
331
+ afterEach(() => {
332
+ sinon.restore();
333
+ });
334
+
326
335
  it('should send member update event with session info', () => {
327
336
  const members = createMembers({url: url1});
328
337
  const fakePayload = {
@@ -343,13 +352,45 @@ describe('plugin-meetings', () => {
343
352
  },
344
353
  EVENT_TRIGGERS.MEMBERS_UPDATE,
345
354
  {
346
- delta: {added: [], updated: []},
355
+ delta: {added: [], updated: [], removedIds: []},
347
356
  full: {},
348
357
  isReplace: true,
349
358
  }
350
359
  );
351
360
  });
352
361
 
362
+ it('should handle participants being removed', () => {
363
+ const members = createMembers({url: url1});
364
+
365
+ // setup the collection with a fake member
366
+ members.membersCollection.setAll(fakeMembersCollection);
367
+ assert.equal(Object.keys(members.membersCollection.getAll()).length, 1);
368
+
369
+ // remove the member
370
+ members.locusParticipantsUpdate({
371
+ participants: [],
372
+ removedParticipantIds: ['test1'],
373
+ });
374
+
375
+ assert.equal(Object.keys(members.membersCollection.getAll()).length, 0);
376
+
377
+ // check that the event was emitted
378
+ assert.calledWith(
379
+ Trigger.trigger,
380
+ members,
381
+ {
382
+ file: 'members',
383
+ function: 'locusParticipantsUpdate',
384
+ },
385
+ EVENT_TRIGGERS.MEMBERS_UPDATE,
386
+ {
387
+ delta: {added: [], updated: [], removedIds: ['test1']},
388
+ full: {},
389
+ isReplace: false,
390
+ }
391
+ );
392
+ });
393
+
353
394
  describe('handles members with paired devices correctly', () => {
354
395
  const runCheck = (propsForUpdate, expectedPropsOnPairedMember) => {
355
396
  const members = createMembers({url: url1});
@@ -973,7 +1014,8 @@ describe('plugin-meetings', () => {
973
1014
  expectedMemberId,
974
1015
  expectedRequestingParticipantId,
975
1016
  expectedAlias,
976
- expectedLocusUrl
1017
+ expectedLocusUrl,
1018
+ expectedSuffix
977
1019
  ) => {
978
1020
  await assert.isFulfilled(resultPromise);
979
1021
  assert.calledOnceWithExactly(
@@ -981,13 +1023,15 @@ describe('plugin-meetings', () => {
981
1023
  expectedMemberId,
982
1024
  expectedRequestingParticipantId,
983
1025
  expectedAlias,
984
- expectedLocusUrl
1026
+ expectedLocusUrl,
1027
+ expectedSuffix
985
1028
  );
986
1029
  assert.calledOnceWithExactly(spies.editDisplayNameMember, {
987
1030
  memberId: expectedMemberId,
988
1031
  requestingParticipantId: expectedRequestingParticipantId,
989
1032
  alias: expectedAlias,
990
1033
  locusUrl: expectedLocusUrl,
1034
+ suffix: expectedSuffix,
991
1035
  });
992
1036
  assert.strictEqual(resultPromise, spies.editDisplayNameMember.getCall(0).returnValue);
993
1037
  };
@@ -1017,6 +1061,31 @@ describe('plugin-meetings', () => {
1017
1061
  });
1018
1062
 
1019
1063
  it('should make the correct request when called with respective parameters', async () => {
1064
+ const requestingParticipantId = uuid.v4();
1065
+ const memberId = uuid.v4();
1066
+ const alias = 'aliasName';
1067
+ const suffix = 'suffixName';
1068
+ const {members, spies} = setup(url1);
1069
+
1070
+ const resultPromise = members.editDisplayName(
1071
+ memberId,
1072
+ requestingParticipantId,
1073
+ alias,
1074
+ suffix
1075
+ );
1076
+
1077
+ await checkValid(
1078
+ resultPromise,
1079
+ spies,
1080
+ memberId,
1081
+ requestingParticipantId,
1082
+ alias,
1083
+ url1,
1084
+ suffix
1085
+ );
1086
+ });
1087
+
1088
+ it('should make the correct request when called with respective parameters - no suffix', async () => {
1020
1089
  const requestingParticipantId = uuid.v4();
1021
1090
  const memberId = uuid.v4();
1022
1091
  const alias = 'aliasName';
@@ -429,6 +429,61 @@ describe('plugin-meetings', () => {
429
429
  },
430
430
  });
431
431
  });
432
+
433
+ it('sends a POST request to the locus endpoint with suffix empty string', async () => {
434
+ const locusUrl = url1;
435
+ const memberId = 'test1';
436
+ const requestingParticipantId = 'test2';
437
+ const aliasValue = 'alias';
438
+
439
+ const options = {
440
+ memberId,
441
+ requestingParticipantId,
442
+ alias: aliasValue,
443
+ locusUrl,
444
+ suffix: '',
445
+ };
446
+
447
+ await membersRequest.editDisplayNameMember(options);
448
+
449
+ checkRequest({
450
+ method: 'POST',
451
+ uri: `${locusUrl}/participant/${memberId}/alias`,
452
+ body: {
453
+ aliasValue,
454
+ requestingParticipantId,
455
+ suffixValue: '',
456
+ },
457
+ });
458
+ });
459
+
460
+ it('sends a POST request to the locus endpoint with suffixValue', async () => {
461
+ const locusUrl = url1;
462
+ const memberId = 'test1';
463
+ const requestingParticipantId = 'test2';
464
+ const aliasValue = 'alias';
465
+ const suffixValue = 'suffix';
466
+
467
+ const options = {
468
+ memberId,
469
+ requestingParticipantId,
470
+ alias: aliasValue,
471
+ locusUrl,
472
+ suffix: suffixValue,
473
+ };
474
+
475
+ await membersRequest.editDisplayNameMember(options);
476
+
477
+ checkRequest({
478
+ method: 'POST',
479
+ uri: `${locusUrl}/participant/${memberId}/alias`,
480
+ body: {
481
+ aliasValue,
482
+ requestingParticipantId,
483
+ suffixValue,
484
+ },
485
+ });
486
+ });
432
487
  });
433
488
 
434
489
  describe('#moveToLobby', () => {
@@ -129,7 +129,32 @@ describe('plugin-meetings', () => {
129
129
  });
130
130
  });
131
131
  describe('#generateEditDisplayNameMemberOptions', () => {
132
- it('returns the correct options', () => {
132
+ it('returns the correct options with suffix when suffix is there', () => {
133
+ const locusUrl = 'urlTest1';
134
+ const memberId = 'test1';
135
+ const requestingParticipantId = 'test2';
136
+ const alias = 'alias';
137
+ const suffix = 'suffix';
138
+
139
+ assert.deepEqual(
140
+ MembersUtil.generateEditDisplayNameMemberOptions(
141
+ memberId,
142
+ requestingParticipantId,
143
+ alias,
144
+ locusUrl,
145
+ suffix
146
+ ),
147
+ {
148
+ memberId,
149
+ requestingParticipantId,
150
+ alias,
151
+ locusUrl,
152
+ suffix,
153
+ }
154
+ );
155
+ });
156
+
157
+ it('returns the correct options without suffix when suffix is not there', () => {
133
158
  const locusUrl = 'urlTest1';
134
159
  const memberId = 'test1';
135
160
  const requestingParticipantId = 'test2';
@@ -147,6 +172,7 @@ describe('plugin-meetings', () => {
147
172
  requestingParticipantId,
148
173
  alias,
149
174
  locusUrl,
175
+ suffix: undefined,
150
176
  }
151
177
  );
152
178
  });
@@ -306,7 +332,7 @@ describe('plugin-meetings', () => {
306
332
  const options = {
307
333
  invitee: {
308
334
  phoneNumber: '1234567890',
309
- isInternalNumber: false
335
+ isInternalNumber: false,
310
336
  },
311
337
  alertIfActive: false,
312
338
  };
@@ -315,7 +341,7 @@ describe('plugin-meetings', () => {
315
341
  invitees: [
316
342
  {
317
343
  address: '1234567890',
318
- isInternalNumber: false
344
+ isInternalNumber: false,
319
345
  },
320
346
  ],
321
347
  alertIfActive: false,
@@ -417,16 +443,10 @@ describe('plugin-meetings', () => {
417
443
  const memberId = 'test';
418
444
  const invitee = {memberId, isInternalNumber: false};
419
445
 
420
- assert.deepEqual(
421
- MembersUtil.cancelInviteByMemberIdOptions(
422
- invitee,
423
- locusUrl
424
- ),
425
- {
426
- invitee,
427
- locusUrl,
428
- }
429
- );
446
+ assert.deepEqual(MembersUtil.cancelInviteByMemberIdOptions(invitee, locusUrl), {
447
+ invitee,
448
+ locusUrl,
449
+ });
430
450
  });
431
451
  });
432
452
 
@@ -436,7 +456,7 @@ describe('plugin-meetings', () => {
436
456
  const memberId = 'test';
437
457
  const options = {
438
458
  locusUrl,
439
- invitee: {memberId, isInternalNumber: false}
459
+ invitee: {memberId, isInternalNumber: false},
440
460
  };
441
461
  const body = {
442
462
  actionType: 'REMOVE',
@@ -452,5 +472,87 @@ describe('plugin-meetings', () => {
452
472
  });
453
473
  });
454
474
  });
475
+
476
+ describe('#editDisplayNameMemberRequestParams', () => {
477
+ it('returns the correct params when suffix is available', () => {
478
+ const locusUrl = 'TestLocusUrl1';
479
+ const memberId = 'test1';
480
+ const alias = 'alias1';
481
+ const requestingParticipantId = '23131';
482
+ const suffix = 'suffix1';
483
+ const options = {
484
+ locusUrl: locusUrl,
485
+ memberId,
486
+ alias,
487
+ requestingParticipantId,
488
+ suffix,
489
+ };
490
+
491
+ const uri = `${locusUrl}/participant/${memberId}/alias`;
492
+
493
+ assert.deepEqual(MembersUtil.editDisplayNameMemberRequestParams(options), {
494
+ method: HTTP_VERBS.POST,
495
+ uri,
496
+ body: {
497
+ aliasValue: alias,
498
+ requestingParticipantId,
499
+ suffixValue: suffix,
500
+ },
501
+ });
502
+ });
503
+
504
+ it('returns the correct params when suffix is not available', () => {
505
+ const locusUrl = 'TestLocusUrl2';
506
+ const memberId = 'test2';
507
+ const alias = 'alias2';
508
+ const requestingParticipantId = '12345';
509
+
510
+ const options = {
511
+ locusUrl: locusUrl,
512
+ memberId,
513
+ alias,
514
+ requestingParticipantId,
515
+ };
516
+
517
+ const uri = `${locusUrl}/participant/${memberId}/alias`;
518
+
519
+ assert.deepEqual(MembersUtil.editDisplayNameMemberRequestParams(options), {
520
+ method: HTTP_VERBS.POST,
521
+ uri,
522
+ body: {
523
+ aliasValue: alias,
524
+ requestingParticipantId,
525
+ },
526
+ });
527
+ });
528
+
529
+ it('returns the correct params when suffix is empty string', () => {
530
+ const locusUrl = 'TestLocusUrl3';
531
+ const memberId = 'test3';
532
+ const alias = 'alias3';
533
+ const requestingParticipantId = '322424';
534
+ const suffix = '';
535
+
536
+ const options = {
537
+ locusUrl: locusUrl,
538
+ memberId,
539
+ alias,
540
+ suffix,
541
+ requestingParticipantId,
542
+ };
543
+
544
+ const uri = `${locusUrl}/participant/${memberId}/alias`;
545
+
546
+ assert.deepEqual(MembersUtil.editDisplayNameMemberRequestParams(options), {
547
+ method: HTTP_VERBS.POST,
548
+ uri,
549
+ body: {
550
+ aliasValue: alias,
551
+ requestingParticipantId,
552
+ suffixValue: suffix,
553
+ },
554
+ });
555
+ });
556
+ });
455
557
  });
456
558
  });
@@ -3,15 +3,14 @@ import MockWebex from '@webex/test-helper-mock-webex';
3
3
  import sinon from 'sinon';
4
4
  import EventEmitter from 'events';
5
5
  import testUtils from '../../../utils/testUtils';
6
- import Reachability, {
7
- ReachabilityResultsForBackend,
8
- } from '@webex/plugin-meetings/src/reachability/';
6
+ import Reachability from '@webex/plugin-meetings/src/reachability/';
9
7
  import {ClusterNode} from '../../../../src/reachability/request';
10
8
  import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
11
9
  import * as ClusterReachabilityModule from '@webex/plugin-meetings/src/reachability/clusterReachability';
12
10
  import Metrics from '@webex/plugin-meetings/src/metrics';
13
11
 
14
12
  import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
13
+ import { ReachabilityResultsForBackend } from '@webex/plugin-meetings/src/reachability/reachability.types';
15
14
 
16
15
  describe('isAnyPublicClusterReachable', () => {
17
16
  let webex;
@@ -836,6 +835,162 @@ describe('gatherReachability', () => {
836
835
  },
837
836
  },
838
837
  // ========================================================================
838
+ {
839
+ title: '2 clusters: one with multiple urls, reachability should resolve after the first result for each protocol is ready',
840
+ waitShortTimeout: false,
841
+ waitLongTimeout: false,
842
+ mockClusters: {
843
+ cluster1: {
844
+ udp: ['udp-url1-1', 'udp-url1-2'],
845
+ tcp: ['tcp-url1-1', 'tcp-url1-2'],
846
+ xtls: ['xtls-url1-1', 'xtls-url1-2'],
847
+ isVideoMesh: false,
848
+ },
849
+ cluster2: {
850
+ udp: ['udp-url2'],
851
+ tcp: ['tcp-url2'],
852
+ xtls: ['xtls-url2'],
853
+ isVideoMesh: false,
854
+ },
855
+ },
856
+ mockResultReadyEvents: [
857
+ // results are only for the first url for each protocol not the 2nd one
858
+ {
859
+ clusterId: 'cluster1',
860
+ protocol: 'udp',
861
+ result: {
862
+ result: 'reachable',
863
+ clientMediaIPs: ['1.2.3.4'],
864
+ latencyInMilliseconds: 10,
865
+ },
866
+ },
867
+ {
868
+ clusterId: 'cluster1',
869
+ protocol: 'tcp',
870
+ result: {
871
+ result: 'reachable',
872
+ latencyInMilliseconds: 100,
873
+ },
874
+ },
875
+ {
876
+ clusterId: 'cluster1',
877
+ protocol: 'xtls',
878
+ result: {
879
+ result: 'reachable',
880
+ latencyInMilliseconds: 200,
881
+ },
882
+ },
883
+ {
884
+ clusterId: 'cluster2',
885
+ protocol: 'udp',
886
+ result: {
887
+ result: 'reachable',
888
+ clientMediaIPs: ['1.2.3.4'],
889
+ latencyInMilliseconds: 20,
890
+ },
891
+ },
892
+ {
893
+ clusterId: 'cluster2',
894
+ protocol: 'tcp',
895
+ result: {
896
+ result: 'reachable',
897
+ latencyInMilliseconds: 110,
898
+ },
899
+ },
900
+ {
901
+ clusterId: 'cluster2',
902
+ protocol: 'xtls',
903
+ result: {
904
+ result: 'reachable',
905
+ latencyInMilliseconds: 220,
906
+ },
907
+ },
908
+ ],
909
+ expectedResults: {
910
+ cluster1: {
911
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
912
+ tcp: {result: 'reachable', latencyInMilliseconds: 100},
913
+ xtls: {result: 'reachable', latencyInMilliseconds: 200},
914
+ isVideoMesh: false,
915
+ },
916
+ cluster2: {
917
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 20},
918
+ tcp: {result: 'reachable', latencyInMilliseconds: 110},
919
+ xtls: {result: 'reachable', latencyInMilliseconds: 220},
920
+ isVideoMesh: false,
921
+ },
922
+ },
923
+ expectedMetrics: {
924
+ vmn_udp_min: -1,
925
+ vmn_udp_max: -1,
926
+ vmn_udp_average: -1,
927
+ public_udp_min: 10,
928
+ public_udp_max: 20,
929
+ public_udp_average: 15,
930
+ public_tcp_min: 100,
931
+ public_tcp_max: 110,
932
+ public_tcp_average: 105,
933
+ public_xtls_min: 200,
934
+ public_xtls_max: 220,
935
+ public_xtls_average: 210,
936
+ },
937
+ },
938
+ // ========================================================================
939
+ {
940
+ title: '1 cluster with zero urls for TCP, reachability should resolve after the first result for each protocol is ready without waiting for TCP',
941
+ waitShortTimeout: false,
942
+ waitLongTimeout: false,
943
+ mockClusters: {
944
+ cluster1: {
945
+ udp: ['udp-url1'],
946
+ tcp: [],
947
+ xtls: ['xtls-url1'],
948
+ isVideoMesh: false,
949
+ },
950
+ },
951
+ mockResultReadyEvents: [
952
+ {
953
+ clusterId: 'cluster1',
954
+ protocol: 'udp',
955
+ result: {
956
+ result: 'reachable',
957
+ clientMediaIPs: ['1.2.3.4'],
958
+ latencyInMilliseconds: 10,
959
+ },
960
+ },
961
+ {
962
+ clusterId: 'cluster1',
963
+ protocol: 'xtls',
964
+ result: {
965
+ result: 'reachable',
966
+ latencyInMilliseconds: 200,
967
+ },
968
+ },
969
+ ],
970
+ expectedResults: {
971
+ cluster1: {
972
+ udp: {result: 'reachable', clientMediaIPs: ['1.2.3.4'], latencyInMilliseconds: 10},
973
+ tcp: {result: 'untested'},
974
+ xtls: {result: 'reachable', latencyInMilliseconds: 200},
975
+ isVideoMesh: false,
976
+ },
977
+ },
978
+ expectedMetrics: {
979
+ vmn_udp_min: -1,
980
+ vmn_udp_max: -1,
981
+ vmn_udp_average: -1,
982
+ public_udp_min: 10,
983
+ public_udp_max: 10,
984
+ public_udp_average: 10,
985
+ public_tcp_min: -1,
986
+ public_tcp_max: -1,
987
+ public_tcp_average: -1,
988
+ public_xtls_min: 200,
989
+ public_xtls_max: 200,
990
+ public_xtls_average: 200,
991
+ },
992
+ },
993
+ // ========================================================================
839
994
  {
840
995
  title: '2 clusters: both with no results at all',
841
996
  waitShortTimeout: 'public',
@@ -321,7 +321,7 @@ describe('TurnDiscovery', () => {
321
321
  result,
322
322
  undefined,
323
323
  undefined,
324
- 'failure: Unexpected token o in JSON at position 1'
324
+ `failure: Unexpected token 'o', "not a json" is not valid JSON`
325
325
  );
326
326
  checkFailureMetricsSent();
327
327
  });
@@ -568,7 +568,7 @@ describe('TurnDiscovery', () => {
568
568
  // @ts-ignore
569
569
  mockRoapRequest.sendRoap.resetHistory();
570
570
 
571
- // simulate the response with some empty urls, normally there would be just 1, but we put more just for the sake of testing
571
+ // simulate the response with some empty urls, normally there would be just 1, but we put more just for the sake of testing
572
572
  td.handleTurnDiscoveryResponse(
573
573
  {
574
574
  messageType: 'TURN_DISCOVERY_RESPONSE',
@@ -960,7 +960,7 @@ describe('TurnDiscovery', () => {
960
960
 
961
961
  assert.deepEqual(result, {
962
962
  turnServerInfo: undefined,
963
- turnDiscoverySkippedReason: 'failure: Unexpected token o in JSON at position 1',
963
+ turnDiscoverySkippedReason: `failure: Unexpected token 'o', "not a json" is not valid JSON`,
964
964
  });
965
965
  });
966
966