@webex/internal-plugin-ediscovery 3.0.0-beta.9 → 3.0.0-beta.91

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.
@@ -20,39 +20,41 @@ describe('EDiscovery Report API Tests', () => {
20
20
  children: {
21
21
  ediscovery: EDiscovery,
22
22
  encryption: Encryption,
23
- mercury: Mercury
24
- }
23
+ mercury: Mercury,
24
+ },
25
25
  });
26
26
  webex.config.ediscovery = config.ediscovery;
27
27
  });
28
28
 
29
29
  describe('CreateReport Tests', () => {
30
30
  it('CreateReport succeeds', async () => {
31
- const result = webex.internal.ediscovery.createReport(reportRequest)
32
- .then((res) => {
33
- expect(res.statusCode).to.equal(200);
34
- });
31
+ const result = webex.internal.ediscovery.createReport(reportRequest).then((res) => {
32
+ expect(res.statusCode).to.equal(200);
33
+ });
35
34
 
36
35
  return result;
37
36
  });
38
37
 
39
38
  it('CreateReport fails with no param', async () => {
40
- const result = expect(webex.internal.ediscovery.createReport()).to.be.rejectedWith(Error, 'Undefined parameter');
39
+ const result = expect(webex.internal.ediscovery.createReport()).to.be.rejectedWith(
40
+ Error,
41
+ 'Undefined parameter'
42
+ );
41
43
 
42
44
  return result;
43
45
  });
44
46
 
45
47
  it('CreateReport timeout defaults to 30s', async () => {
46
- const result = webex.internal.ediscovery.createReport(reportRequest)
47
- .then(() => {
48
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
49
- });
48
+ const result = webex.internal.ediscovery.createReport(reportRequest).then(() => {
49
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
50
+ });
50
51
 
51
52
  return result;
52
53
  });
53
54
 
54
55
  it('CreateReport timeout can be overwritten to 5s', async () => {
55
- const result = webex.internal.ediscovery.createReport(reportRequest, {timeoutMs: 5000})
56
+ const result = webex.internal.ediscovery
57
+ .createReport(reportRequest, {timeoutMs: 5000})
56
58
  .then(() => {
57
59
  sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
58
60
  });
@@ -66,12 +68,15 @@ describe('EDiscovery Report API Tests', () => {
66
68
 
67
69
  error.message = JSON.stringify(invalidEmails);
68
70
  error.errorCode = InvalidEmailAddressError.getErrorCode();
69
- const result = webex.internal.ediscovery._handleReportRequestError({body: error})
71
+ const result = webex.internal.ediscovery
72
+ ._handleReportRequestError({body: error})
70
73
  .catch((response) => {
71
74
  const invalidEmailsError = new InvalidEmailAddressError(invalidEmails);
72
75
 
73
76
  expect(response.name).to.equal(invalidEmailsError.name);
74
- expect(JSON.stringify(response.message)).to.equal(JSON.stringify(invalidEmailsError.message));
77
+ expect(JSON.stringify(response.message)).to.equal(
78
+ JSON.stringify(invalidEmailsError.message)
79
+ );
75
80
  });
76
81
 
77
82
  return result;
@@ -80,28 +85,25 @@ describe('EDiscovery Report API Tests', () => {
80
85
 
81
86
  describe('GetReports Tests', () => {
82
87
  it('GetReports succeeds', async () => {
83
- const result = webex.internal.ediscovery.getReports({})
84
- .then((res) => {
85
- expect(res.statusCode).to.equal(200);
86
- });
88
+ const result = webex.internal.ediscovery.getReports({}).then((res) => {
89
+ expect(res.statusCode).to.equal(200);
90
+ });
87
91
 
88
92
  return result;
89
93
  });
90
94
 
91
95
  it('GetReports timeout defaults to 30s', async () => {
92
- const result = webex.internal.ediscovery.getReports()
93
- .then(() => {
94
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
95
- });
96
+ const result = webex.internal.ediscovery.getReports().then(() => {
97
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
98
+ });
96
99
 
97
100
  return result;
98
101
  });
99
102
 
100
103
  it('GetReports timeout can be overwritten to 5s', async () => {
101
- const result = webex.internal.ediscovery.getReports({timeoutMs: 5000})
102
- .then(() => {
103
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
104
- });
104
+ const result = webex.internal.ediscovery.getReports({timeoutMs: 5000}).then(() => {
105
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
106
+ });
105
107
 
106
108
  return result;
107
109
  });
@@ -109,34 +111,34 @@ describe('EDiscovery Report API Tests', () => {
109
111
 
110
112
  describe('GetReport Tests', () => {
111
113
  it('GetReport succeeds', async () => {
112
- const result = webex.internal.ediscovery.getReport(uuid)
113
- .then((res) => {
114
- expect(res.statusCode).to.equal(200);
115
- });
114
+ const result = webex.internal.ediscovery.getReport(uuid).then((res) => {
115
+ expect(res.statusCode).to.equal(200);
116
+ });
116
117
 
117
118
  return result;
118
119
  });
119
120
 
120
121
  it('GetReport fails with no params', async () => {
121
- const result = expect(webex.internal.ediscovery.getReport()).to.be.rejectedWith(Error, 'Undefined parameter');
122
+ const result = expect(webex.internal.ediscovery.getReport()).to.be.rejectedWith(
123
+ Error,
124
+ 'Undefined parameter'
125
+ );
122
126
 
123
127
  return result;
124
128
  });
125
129
 
126
130
  it('GetReport timeout defaults to 30s', async () => {
127
- const result = webex.internal.ediscovery.getReport(uuid)
128
- .then(() => {
129
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
130
- });
131
+ const result = webex.internal.ediscovery.getReport(uuid).then(() => {
132
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
133
+ });
131
134
 
132
135
  return result;
133
136
  });
134
137
 
135
138
  it('GetReport timeout can be overwritten to 5s', async () => {
136
- const result = webex.internal.ediscovery.getReport(uuid, {timeoutMs: 5000})
137
- .then(() => {
138
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
139
- });
139
+ const result = webex.internal.ediscovery.getReport(uuid, {timeoutMs: 5000}).then(() => {
140
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
141
+ });
140
142
 
141
143
  return result;
142
144
  });
@@ -144,34 +146,34 @@ describe('EDiscovery Report API Tests', () => {
144
146
 
145
147
  describe('DeleteReport Tests', () => {
146
148
  it('DeleteReport suceeds', async () => {
147
- const result = webex.internal.ediscovery.deleteReport(uuid)
148
- .then((res) => {
149
- expect(res.statusCode).to.equal(200);
150
- });
149
+ const result = webex.internal.ediscovery.deleteReport(uuid).then((res) => {
150
+ expect(res.statusCode).to.equal(200);
151
+ });
151
152
 
152
153
  return result;
153
154
  });
154
155
 
155
156
  it('DeleteReport fails with no params', async () => {
156
- const result = expect(webex.internal.ediscovery.deleteReport()).to.be.rejectedWith(Error, 'Undefined parameter');
157
+ const result = expect(webex.internal.ediscovery.deleteReport()).to.be.rejectedWith(
158
+ Error,
159
+ 'Undefined parameter'
160
+ );
157
161
 
158
162
  return result;
159
163
  });
160
164
 
161
165
  it('DeleteReport timeout defaults to 30s', async () => {
162
- const result = webex.internal.ediscovery.deleteReport(uuid)
163
- .then(() => {
164
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
165
- });
166
+ const result = webex.internal.ediscovery.deleteReport(uuid).then(() => {
167
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
168
+ });
166
169
 
167
170
  return result;
168
171
  });
169
172
 
170
173
  it('DeleteReport timeout can be overwritten to 5s', async () => {
171
- const result = webex.internal.ediscovery.deleteReport(uuid, {timeoutMs: 5000})
172
- .then(() => {
173
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
174
- });
174
+ const result = webex.internal.ediscovery.deleteReport(uuid, {timeoutMs: 5000}).then(() => {
175
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
176
+ });
175
177
 
176
178
  return result;
177
179
  });
@@ -179,34 +181,34 @@ describe('EDiscovery Report API Tests', () => {
179
181
 
180
182
  describe('RestartReport Tests', () => {
181
183
  it('RestartReport succeeds', async () => {
182
- const result = webex.internal.ediscovery.restartReport(uuid)
183
- .then((res) => {
184
- expect(res.statusCode).to.equal(200);
185
- });
184
+ const result = webex.internal.ediscovery.restartReport(uuid).then((res) => {
185
+ expect(res.statusCode).to.equal(200);
186
+ });
186
187
 
187
188
  return result;
188
189
  });
189
190
 
190
191
  it('RestartReport fails with no params', async () => {
191
- const result = expect(webex.internal.ediscovery.restartReport()).to.be.rejectedWith(Error, 'Undefined parameter');
192
+ const result = expect(webex.internal.ediscovery.restartReport()).to.be.rejectedWith(
193
+ Error,
194
+ 'Undefined parameter'
195
+ );
192
196
 
193
197
  return result;
194
198
  });
195
199
 
196
200
  it('RestartReport timeout defaults to 30s', async () => {
197
- const result = webex.internal.ediscovery.restartReport(uuid)
198
- .then(() => {
199
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
200
- });
201
+ const result = webex.internal.ediscovery.restartReport(uuid).then(() => {
202
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
203
+ });
201
204
 
202
205
  return result;
203
206
  });
204
207
 
205
208
  it('RestartReport timeout can be overwritten to 5s', async () => {
206
- const result = webex.internal.ediscovery.restartReport(uuid, {timeoutMs: 5000})
207
- .then(() => {
208
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
209
- });
209
+ const result = webex.internal.ediscovery.restartReport(uuid, {timeoutMs: 5000}).then(() => {
210
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
211
+ });
210
212
 
211
213
  return result;
212
214
  });
@@ -214,28 +216,25 @@ describe('EDiscovery Report API Tests', () => {
214
216
 
215
217
  describe('GetClientConfig Tests', () => {
216
218
  it('GetClientConfig succeeds', async () => {
217
- const result = webex.internal.ediscovery.getClientConfig()
218
- .then((res) => {
219
- expect(res.statusCode).to.equal(200);
220
- });
219
+ const result = webex.internal.ediscovery.getClientConfig().then((res) => {
220
+ expect(res.statusCode).to.equal(200);
221
+ });
221
222
 
222
223
  return result;
223
224
  });
224
225
 
225
226
  it('GetClientConfig timeout defaults to 30s', async () => {
226
- const result = webex.internal.ediscovery.getClientConfig()
227
- .then(() => {
228
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
229
- });
227
+ const result = webex.internal.ediscovery.getClientConfig().then(() => {
228
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', defaultTimeout));
229
+ });
230
230
 
231
231
  return result;
232
232
  });
233
233
 
234
234
  it('GetClientConfig timeout can be overwritten to 5s', async () => {
235
- const result = webex.internal.ediscovery.getClientConfig({timeoutMs: 5000})
236
- .then(() => {
237
- sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
238
- });
235
+ const result = webex.internal.ediscovery.getClientConfig({timeoutMs: 5000}).then(() => {
236
+ sinon.assert.calledWith(webex.request, sinon.match.has('timeout', 5000));
237
+ });
239
238
 
240
239
  return result;
241
240
  });