@webex/internal-plugin-lyra 3.0.0-beta.2 → 3.0.0-beta.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.
@@ -24,20 +24,22 @@ describe('plugin-lyra', () => {
24
24
  before('create lyra machine', function () {
25
25
  this.timeout(retry.timeout(20000));
26
26
 
27
- return retry(() => testUsers.create({
28
- count: 1,
29
- config: {
30
- machineType: 'LYRA_SPACE',
31
- type: 'MACHINE',
32
- password: `${generateRandomString(32)}d_wA*`
33
- }
34
- }))
27
+ return retry(() =>
28
+ testUsers.create({
29
+ count: 1,
30
+ config: {
31
+ machineType: 'LYRA_SPACE',
32
+ type: 'MACHINE',
33
+ password: `${generateRandomString(32)}d_wA*`,
34
+ },
35
+ })
36
+ )
35
37
  .then((machines) => {
36
38
  lyraMachine = machines[0];
37
39
  lyraMachine.webex = new WebexCore({
38
40
  credentials: {
39
- authorization: lyraMachine.token
40
- }
41
+ authorization: lyraMachine.token,
42
+ },
41
43
  });
42
44
 
43
45
  // binding to conversation only works with webex board device
@@ -56,31 +58,37 @@ describe('plugin-lyra', () => {
56
58
  });
57
59
  });
58
60
 
59
- before('create users', () => testUsers.create({count: 2})
60
- .then((users) => {
61
+ before('create users', () =>
62
+ testUsers.create({count: 2}).then((users) => {
61
63
  participants = users;
62
64
  spock = participants[0];
63
65
 
64
- return Promise.all(Array.map(participants, (participant) => {
65
- participant.webex = new WebexCore({
66
- credentials: {
67
- authorization: participant.token
68
- }
69
- });
70
-
71
- return participant.webex.internal.mercury.connect();
72
- }));
73
- }));
74
-
75
- before('create conversation', () => retry(() => participants[0].webex.internal.conversation.create({
76
- displayName: 'Test Lyra Conversation',
77
- participants
78
- }))
79
- .then((c) => {
66
+ return Promise.all(
67
+ Array.map(participants, (participant) => {
68
+ participant.webex = new WebexCore({
69
+ credentials: {
70
+ authorization: participant.token,
71
+ },
72
+ });
73
+
74
+ return participant.webex.internal.mercury.connect();
75
+ })
76
+ );
77
+ })
78
+ );
79
+
80
+ before('create conversation', () =>
81
+ retry(() =>
82
+ participants[0].webex.internal.conversation.create({
83
+ displayName: 'Test Lyra Conversation',
84
+ participants,
85
+ })
86
+ ).then((c) => {
80
87
  conversation = c;
81
88
 
82
89
  return conversation;
83
- }));
90
+ })
91
+ );
84
92
 
85
93
  describe('#getAudioState', () => {
86
94
  let audioState;
@@ -88,19 +96,19 @@ describe('plugin-lyra', () => {
88
96
  before('put audio state', () => {
89
97
  audioState = {
90
98
  volume: {
91
- level: 2
99
+ level: 2,
92
100
  },
93
101
  microphones: {
94
- muted: false
102
+ muted: false,
95
103
  },
96
- deviceUrl: lyraMachine.webex.internal.device.url
104
+ deviceUrl: lyraMachine.webex.internal.device.url,
97
105
  };
98
106
 
99
107
  return lyraMachine.webex.internal.lyra.device.putAudioState(lyraMachine.space, audioState);
100
108
  });
101
109
 
102
- it('returns audio state', () => lyraMachine.webex.internal.lyra.device.getAudioState(lyraMachine.space)
103
- .then((res) => {
110
+ it('returns audio state', () =>
111
+ lyraMachine.webex.internal.lyra.device.getAudioState(lyraMachine.space).then((res) => {
104
112
  assert.equal(res.microphones.muted, audioState.microphones.muted);
105
113
  assert.equal(res.volume.level, audioState.volume.level);
106
114
  }));
@@ -108,14 +116,19 @@ describe('plugin-lyra', () => {
108
116
 
109
117
  // Skip until we can bind a conversation to lyra space by posting capabilities to Lyra.
110
118
  describe.skip('when a call is in progress', () => {
111
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace)
112
- .then(() => lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id))
113
- .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation)));
119
+ before('ensure participant joined space', () =>
120
+ spock.webex.internal.lyra.space
121
+ .join(lyraSpace)
122
+ .then(() =>
123
+ lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id)
124
+ )
125
+ .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
126
+ );
114
127
 
115
128
  before('make a call', () => {
116
129
  const locus = {
117
130
  url: conversation.locusUrl,
118
- correlationId: uuid.v4()
131
+ correlationId: uuid.v4(),
119
132
  };
120
133
 
121
134
  return spock.webex.request({
@@ -124,19 +137,23 @@ describe('plugin-lyra', () => {
124
137
  body: {
125
138
  correlationId: locus.correlationId,
126
139
  deviceUrl: spock.webex.internal.device.url,
127
- localMedias: []
128
- }
140
+ localMedias: [],
141
+ },
129
142
  });
130
143
  });
131
144
 
132
- after('remove binding', () => spock.webex.internal.lyra.space.unbindConversation(lyraMachine.space, conversation)
133
- // After hooks shouldn't be able to break tests
134
- .catch((err) => console.error(err)));
145
+ after('remove binding', () =>
146
+ spock.webex.internal.lyra.space
147
+ .unbindConversation(lyraMachine.space, conversation)
148
+ // After hooks shouldn't be able to break tests
149
+ .catch((err) => console.error(err))
150
+ );
135
151
 
136
152
  it('mutes', () => {
137
153
  spock.webex.internal.lyra.device.mute(lyraMachine.space);
138
154
 
139
- return lyraMachine.webex.internal.mercury.when('event:lyra.space_audio_microphones_mute_action')
155
+ return lyraMachine.webex.internal.mercury
156
+ .when('event:lyra.space_audio_microphones_mute_action')
140
157
  .then(([event]) => {
141
158
  assert.equal(event.data.action, 'mute');
142
159
  });
@@ -145,7 +162,8 @@ describe('plugin-lyra', () => {
145
162
  it('unmutes', () => {
146
163
  spock.webex.internal.lyra.device.unmute(lyraMachine.space);
147
164
 
148
- return lyraMachine.webex.internal.mercury.when('event:lyra.space_audio_microphones_mute_action')
165
+ return lyraMachine.webex.internal.mercury
166
+ .when('event:lyra.space_audio_microphones_mute_action')
149
167
  .then(([event]) => {
150
168
  assert.equal(event.data.action, 'unMute');
151
169
  });
@@ -154,7 +172,8 @@ describe('plugin-lyra', () => {
154
172
  it('increases volume', () => {
155
173
  spock.webex.internal.lyra.device.increaseVolume(lyraMachine.space);
156
174
 
157
- return lyraMachine.webex.internal.mercury.when('event:lyra.space_audio_volume_change_action')
175
+ return lyraMachine.webex.internal.mercury
176
+ .when('event:lyra.space_audio_volume_change_action')
158
177
  .then(([event]) => {
159
178
  assert.equal(event.data.action, 'increase');
160
179
  });
@@ -163,7 +182,8 @@ describe('plugin-lyra', () => {
163
182
  it('decreases volume', () => {
164
183
  spock.webex.internal.lyra.device.decreaseVolume(lyraMachine.space);
165
184
 
166
- return lyraMachine.webex.internal.mercury.when('event:lyra.space_audio_volume_change_action')
185
+ return lyraMachine.webex.internal.mercury
186
+ .when('event:lyra.space_audio_volume_change_action')
167
187
  .then(([event]) => {
168
188
  assert.equal(event.data.action, 'decrease');
169
189
  });
@@ -172,7 +192,8 @@ describe('plugin-lyra', () => {
172
192
  it('sets volume', () => {
173
193
  spock.webex.internal.lyra.device.setVolume(lyraMachine.space, 2);
174
194
 
175
- return lyraMachine.webex.internal.mercury.when('event:lyra.space_audio_volume_set_action')
195
+ return lyraMachine.webex.internal.mercury
196
+ .when('event:lyra.space_audio_volume_set_action')
176
197
  .then(([event]) => {
177
198
  assert.equal(event.data.level, 2);
178
199
  });
@@ -25,20 +25,22 @@ describe('plugin-lyra', function () {
25
25
  before('create lyra machine', function () {
26
26
  this.timeout(retry.timeout(20000));
27
27
 
28
- return retry(() => testUsers.create({
29
- count: 1,
30
- config: {
31
- machineType: 'LYRA_SPACE',
32
- type: 'MACHINE',
33
- password: `${generateRandomString(32)}d_wA*`
34
- }
35
- }))
28
+ return retry(() =>
29
+ testUsers.create({
30
+ count: 1,
31
+ config: {
32
+ machineType: 'LYRA_SPACE',
33
+ type: 'MACHINE',
34
+ password: `${generateRandomString(32)}d_wA*`,
35
+ },
36
+ })
37
+ )
36
38
  .then((machines) => {
37
39
  lyraMachine = machines[0];
38
40
  lyraMachine.webex = new WebexCore({
39
41
  credentials: {
40
- authorization: lyraMachine.token
41
- }
42
+ authorization: lyraMachine.token,
43
+ },
42
44
  });
43
45
 
44
46
  // binding to conversation only works with webex board device
@@ -57,131 +59,174 @@ describe('plugin-lyra', function () {
57
59
  });
58
60
  });
59
61
 
60
- before('create users', () => testUsers.create({count: 2})
61
- .then((users) => {
62
+ before('create users', () =>
63
+ testUsers.create({count: 2}).then((users) => {
62
64
  participants = users;
63
65
  spock = participants[0];
64
66
 
65
- return Promise.all(Array.map(participants, (participant) => {
66
- participant.webex = new WebexCore({
67
- credentials: {
68
- authorization: participant.token
69
- }
70
- });
71
-
72
- return participant.webex.internal.mercury.connect();
73
- }));
74
- }));
75
-
76
- before('create conversation', () => retry(() => participants[0].webex.internal.conversation.create({
77
- displayName: 'Test Lyra Conversation',
78
- participants
79
- }))
80
- .then((c) => {
67
+ return Promise.all(
68
+ Array.map(participants, (participant) => {
69
+ participant.webex = new WebexCore({
70
+ credentials: {
71
+ authorization: participant.token,
72
+ },
73
+ });
74
+
75
+ return participant.webex.internal.mercury.connect();
76
+ })
77
+ );
78
+ })
79
+ );
80
+
81
+ before('create conversation', () =>
82
+ retry(() =>
83
+ participants[0].webex.internal.conversation.create({
84
+ displayName: 'Test Lyra Conversation',
85
+ participants,
86
+ })
87
+ ).then((c) => {
81
88
  conversation = c;
82
89
 
83
90
  return conversation;
84
- }));
91
+ })
92
+ );
85
93
 
86
94
  describe('#list()', () => {
87
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace));
95
+ before('ensure participant joined space', () =>
96
+ spock.webex.internal.lyra.space.join(lyraSpace)
97
+ );
88
98
 
89
- it('returns spaces', () => spock.webex.internal.lyra.space.list()
90
- .then((spaces) => {
99
+ it('returns spaces', () =>
100
+ spock.webex.internal.lyra.space.list().then((spaces) => {
91
101
  assert.lengthOf(spaces, 1);
92
102
  assert.deepEqual(spaces[0].identity, lyraMachine.space.identity);
93
103
  }));
94
104
  });
95
105
 
96
106
  describe('#get()', () => {
97
- it('returns space info', () => spock.webex.internal.lyra.space.get(lyraMachine.space)
98
- .then((lyraSpace) => assert.deepEqual(lyraMachine.space.identity, lyraSpace.identity)));
107
+ it('returns space info', () =>
108
+ spock.webex.internal.lyra.space
109
+ .get(lyraMachine.space)
110
+ .then((lyraSpace) => assert.deepEqual(lyraMachine.space.identity, lyraSpace.identity)));
99
111
  });
100
112
 
101
113
  describe('#join()', () => {
102
- it('adds the current user to lyra space', () => spock.webex.internal.lyra.space.join(lyraSpace)
103
- .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
104
- .then((lyraSpace) => {
105
- assert.lengthOf(lyraSpace.occupants.items, 1);
106
- assert.equal(lyraSpace.occupants.items[0].identity.id, spock.id);
107
- }));
114
+ it('adds the current user to lyra space', () =>
115
+ spock.webex.internal.lyra.space
116
+ .join(lyraSpace)
117
+ .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
118
+ .then((lyraSpace) => {
119
+ assert.lengthOf(lyraSpace.occupants.items, 1);
120
+ assert.equal(lyraSpace.occupants.items[0].identity.id, spock.id);
121
+ }));
108
122
  });
109
123
 
110
124
  describe('#leave()', () => {
111
- it('removes the current user from lyra space', () => spock.webex.internal.lyra.space.join(lyraSpace)
112
- .then(() => spock.webex.internal.lyra.space.leave(lyraSpace))
113
- .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
114
- .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
125
+ it('removes the current user from lyra space', () =>
126
+ spock.webex.internal.lyra.space
127
+ .join(lyraSpace)
128
+ .then(() => spock.webex.internal.lyra.space.leave(lyraSpace))
129
+ .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
130
+ .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
115
131
 
116
132
  describe('when a user has multiple devices in the space', () => {
117
133
  before('add another device', () => {
118
134
  spock.webex2 = new WebexCore({
119
135
  credentials: {
120
- authorization: spock.token
121
- }
136
+ authorization: spock.token,
137
+ },
122
138
  });
123
139
 
124
- return spock.webex2.internal.device.register()
140
+ return spock.webex2.internal.device
141
+ .register()
125
142
  .then(() => spock.webex.internal.lyra.space.join(lyraSpace))
126
143
  .then(() => spock.webex2.internal.lyra.space.join(lyraSpace));
127
144
  });
128
145
 
129
- it('removes all devices from lyra space', () => spock.webex.internal.lyra.space.leave(lyraSpace, {
130
- removeAllDevices: true
131
- })
132
- .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
133
- .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
146
+ it('removes all devices from lyra space', () =>
147
+ spock.webex.internal.lyra.space
148
+ .leave(lyraSpace, {
149
+ removeAllDevices: true,
150
+ })
151
+ .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
152
+ .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
134
153
  });
135
154
  });
136
155
 
137
-
138
156
  // Skip until we can bind a conversation to lyra space by posting capabilities to Lyra.
139
157
 
140
158
  describe.skip('#bindConversation()', () => {
141
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace)
142
- .then(() => lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id))
143
- .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation)));
144
-
145
- after('remove binding', () => spock.webex.internal.lyra.space.unbindConversation(lyraSpace, conversation)
146
- // After hooks shouldn't be able to break tests
147
- .catch((err) => console.error(err)));
148
-
149
- it('binds conversation and lyra space', () => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space)
150
- .then(({bindings}) => {
159
+ before('ensure participant joined space', () =>
160
+ spock.webex.internal.lyra.space
161
+ .join(lyraSpace)
162
+ .then(() =>
163
+ lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id)
164
+ )
165
+ .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
166
+ );
167
+
168
+ after('remove binding', () =>
169
+ spock.webex.internal.lyra.space
170
+ .unbindConversation(lyraSpace, conversation)
171
+ // After hooks shouldn't be able to break tests
172
+ .catch((err) => console.error(err))
173
+ );
174
+
175
+ it('binds conversation and lyra space', () =>
176
+ spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space).then(({bindings}) => {
151
177
  assert.lengthOf(bindings, 1);
152
178
  assert.equal(bindings[0].conversationUrl, conversation.url);
153
179
  }));
154
180
  });
155
181
 
156
182
  describe.skip('#unbindConversation()', () => {
157
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace)
158
- .then(() => lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id))
159
- .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
160
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
161
- .then(({bindings}) => assert.lengthOf(bindings, 1)));
183
+ before('ensure participant joined space', () =>
184
+ spock.webex.internal.lyra.space
185
+ .join(lyraSpace)
186
+ .then(() =>
187
+ lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id)
188
+ )
189
+ .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
190
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
191
+ .then(({bindings}) => assert.lengthOf(bindings, 1))
192
+ );
162
193
 
163
194
  // Skip this feature in IE. We do not support it at this time.
164
- (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () => spock.webex.internal.lyra.space.unbindConversation(lyraSpace, conversation)
165
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
166
- .then(({bindings}) => assert.lengthOf(bindings, 0)));
195
+ (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () =>
196
+ spock.webex.internal.lyra.space
197
+ .unbindConversation(lyraSpace, conversation)
198
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
199
+ .then(({bindings}) => assert.lengthOf(bindings, 0))
200
+ );
167
201
  });
168
202
 
169
203
  describe.skip('#deleteBinding()', () => {
170
204
  let bindingId;
171
205
 
172
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace)
173
- .then(() => lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id))
174
- .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
175
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
176
- .then(({bindings}) => {
177
- assert.lengthOf(bindings, 1);
178
- bindingId = bindings[0].bindingUrl.split('/').pop();
179
- }));
206
+ before('ensure participant joined space', () =>
207
+ spock.webex.internal.lyra.space
208
+ .join(lyraSpace)
209
+ .then(() =>
210
+ lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id)
211
+ )
212
+ .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
213
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
214
+ .then(({bindings}) => {
215
+ assert.lengthOf(bindings, 1);
216
+ bindingId = bindings[0].bindingUrl.split('/').pop();
217
+ })
218
+ );
180
219
 
181
220
  // Skip this feature in IE. We do not support it at this time.
182
- (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () => spock.webex.internal.lyra.space.deleteBinding(lyraMachine.space, {kmsResourceObjectUrl: conversation.kmsResourceObjectUrl, bindingId})
183
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
184
- .then(({bindings}) => assert.lengthOf(bindings, 0)));
221
+ (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () =>
222
+ spock.webex.internal.lyra.space
223
+ .deleteBinding(lyraMachine.space, {
224
+ kmsResourceObjectUrl: conversation.kmsResourceObjectUrl,
225
+ bindingId,
226
+ })
227
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
228
+ .then(({bindings}) => assert.lengthOf(bindings, 0))
229
+ );
185
230
  });
186
231
  });
187
232
  });
@@ -12,9 +12,9 @@ describe('plugin-lyra', () => {
12
12
  const lyraSpaceUrl = `https://lyra/api/v1/${lyraSpaceId}`;
13
13
  const lyraSpace = {
14
14
  identity: {
15
- id: lyraSpaceId
15
+ id: lyraSpaceId,
16
16
  },
17
- url: lyraSpaceUrl
17
+ url: lyraSpaceUrl,
18
18
  };
19
19
 
20
20
  let webex;
@@ -22,12 +22,12 @@ describe('plugin-lyra', () => {
22
22
  before(() => {
23
23
  webex = new MockWebex({
24
24
  children: {
25
- lyra: Lyra
25
+ lyra: Lyra,
26
26
  },
27
27
  device: {
28
28
  url: 'deviceUrl',
29
- userId: '1234'
30
- }
29
+ userId: '1234',
30
+ },
31
31
  });
32
32
 
33
33
  webex.config.lyra = lyraConfig.lyra;
@@ -39,19 +39,26 @@ describe('plugin-lyra', () => {
39
39
 
40
40
  describe('device', () => {
41
41
  describe('#putAudioState', () => {
42
- it('requires audioState.deviceUrl', () => assert.isRejected(webex.internal.lyra.device.putAudioState(lyraSpace), /audioState.deviceUrl is required/));
42
+ it('requires audioState.deviceUrl', () =>
43
+ assert.isRejected(
44
+ webex.internal.lyra.device.putAudioState(lyraSpace),
45
+ /audioState.deviceUrl is required/
46
+ ));
43
47
  });
44
48
 
45
49
  describe('#setVolume', () => {
46
- it('defaults to level 0', () => webex.internal.lyra.device.setVolume(lyraSpace)
47
- .then(() => {
48
- assert.calledWith(webex.request, sinon.match({
49
- method: 'POST',
50
- uri: `${lyraSpace.url}/audio/volume/actions/set/invoke`,
51
- body: {
52
- level: 0
53
- }
54
- }));
50
+ it('defaults to level 0', () =>
51
+ webex.internal.lyra.device.setVolume(lyraSpace).then(() => {
52
+ assert.calledWith(
53
+ webex.request,
54
+ sinon.match({
55
+ method: 'POST',
56
+ uri: `${lyraSpace.url}/audio/volume/actions/set/invoke`,
57
+ body: {
58
+ level: 0,
59
+ },
60
+ })
61
+ );
55
62
  }));
56
63
  });
57
64
  });
@@ -13,8 +13,8 @@ describe('plugin-lyra', () => {
13
13
  before(() => {
14
14
  webex = new MockWebex({
15
15
  children: {
16
- lyra: Lyra
17
- }
16
+ lyra: Lyra,
17
+ },
18
18
  });
19
19
 
20
20
  webex.config.lyra = lyraConfig.lyra;
@@ -26,15 +26,20 @@ describe('plugin-lyra', () => {
26
26
 
27
27
  describe('lyra', () => {
28
28
  describe('#getAdvertisedEndpoint()', () => {
29
- it('sends GET request to proximity', () => webex.internal.lyra.getAdvertisedEndpoint('token')
30
- .then(() => assert.calledWith(webex.request, sinon.match({
31
- method: 'GET',
32
- api: 'proximity',
33
- resource: '/ultrasound/advertisements',
34
- qs: {
35
- token: 'token'
36
- }
37
- }))));
29
+ it('sends GET request to proximity', () =>
30
+ webex.internal.lyra.getAdvertisedEndpoint('token').then(() =>
31
+ assert.calledWith(
32
+ webex.request,
33
+ sinon.match({
34
+ method: 'GET',
35
+ api: 'proximity',
36
+ resource: '/ultrasound/advertisements',
37
+ qs: {
38
+ token: 'token',
39
+ },
40
+ })
41
+ )
42
+ ));
38
43
  });
39
44
  });
40
45
  });