@@ -18,8 +18,6 @@ import {describe, it, before, beforeEach} from 'mocha';
18
18
import * as proxyquire from 'proxyquire' ;
19
19
import { CallOptions } from 'google-gax' ;
20
20
21
- /* tslint:disable:no-any */
22
-
23
21
let promisified = false ;
24
22
const fakePromisify = Object . assign ( { } , promisify , {
25
23
promisifyAll ( klass : Function ) {
@@ -39,12 +37,17 @@ describe('Bigtable/AppProfile', () => {
39
37
} ;
40
38
41
39
const APP_PROFILE_NAME = `${ INSTANCE . name } /appProfiles/${ APP_PROFILE_ID } ` ;
40
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
41
let AppProfile : any ;
42
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
43
let appProfile : any ;
44
44
45
45
class FakeCluster {
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
47
instance : any ;
48
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
49
id : any ;
50
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
51
constructor ( instance : any , id : any ) {
49
52
this . instance = instance ;
50
53
this . id = id ;
@@ -97,7 +100,7 @@ describe('Bigtable/AppProfile', () => {
97
100
it ( 'should throw if cluster id in wrong format' , ( ) => {
98
101
const id = `appProfiles/${ APP_PROFILE_ID } ` ;
99
102
assert . throws ( ( ) => {
100
- const a = new AppProfile ( INSTANCE , id ) ;
103
+ new AppProfile ( INSTANCE , id ) ;
101
104
} , Error ) ;
102
105
} ) ;
103
106
} ) ;
@@ -159,8 +162,11 @@ describe('Bigtable/AppProfile', () => {
159
162
const options = { } ;
160
163
161
164
appProfile . instance . createAppProfile = (
165
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
162
166
id : any ,
167
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
163
168
options_ : any ,
169
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
164
170
callback : any
165
171
) => {
166
172
assert . strictEqual ( id , appProfile . id ) ;
@@ -173,8 +179,11 @@ describe('Bigtable/AppProfile', () => {
173
179
174
180
it ( 'should not require options' , done => {
175
181
appProfile . instance . createAppProfile = (
182
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
176
183
id : any ,
184
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
177
185
options : any ,
186
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
178
187
callback : any
179
188
) => {
180
189
assert . deepStrictEqual ( options , { } ) ;
@@ -187,6 +196,7 @@ describe('Bigtable/AppProfile', () => {
187
196
188
197
describe ( 'delete' , ( ) => {
189
198
it ( 'should make the correct request' , done => {
199
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
190
200
appProfile . bigtable . request = ( config : any , callback : any ) => {
191
201
assert . strictEqual ( config . client , 'BigtableInstanceAdminClient' ) ;
192
202
assert . strictEqual ( config . method , 'deleteAppProfile' ) ;
@@ -204,6 +214,7 @@ describe('Bigtable/AppProfile', () => {
204
214
it ( 'should accept gaxOptions' , done => {
205
215
const gaxOptions = { } ;
206
216
217
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
207
218
appProfile . bigtable . request = ( config : any ) => {
208
219
assert . strictEqual ( config . gaxOpts , gaxOptions ) ;
209
220
done ( ) ;
@@ -213,6 +224,7 @@ describe('Bigtable/AppProfile', () => {
213
224
} ) ;
214
225
215
226
it ( 'should accept ignoreWarnings' , done => {
227
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
216
228
appProfile . bigtable . request = ( config : any ) => {
217
229
assert . strictEqual ( config . reqOpts . ignoreWarnings , true ) ;
218
230
done ( ) ;
@@ -354,6 +366,7 @@ describe('Bigtable/AppProfile', () => {
354
366
355
367
describe ( 'getMetadata' , ( ) => {
356
368
it ( 'should make correct request' , done => {
369
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
357
370
appProfile . bigtable . request = ( config : any ) => {
358
371
assert . strictEqual ( config . client , 'BigtableInstanceAdminClient' ) ;
359
372
assert . strictEqual ( config . method , 'getAppProfile' ) ;
@@ -373,6 +386,7 @@ describe('Bigtable/AppProfile', () => {
373
386
it ( 'should accept gaxOptions' , done => {
374
387
const gaxOptions = { } ;
375
388
389
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
376
390
appProfile . bigtable . request = ( config : any ) => {
377
391
assert . strictEqual ( config . gaxOpts , gaxOptions ) ;
378
392
done ( ) ;
@@ -398,7 +412,7 @@ describe('Bigtable/AppProfile', () => {
398
412
const args = [ { } , { } , { } ] ;
399
413
400
414
appProfile . bigtable . request = ( config : { } , callback : Function ) => {
401
- callback . apply ( null , args ) ;
415
+ callback ( ... args ) ;
402
416
} ;
403
417
404
418
appProfile . getMetadata ( ( ...argies : Array < { } > ) => {
@@ -410,6 +424,7 @@ describe('Bigtable/AppProfile', () => {
410
424
411
425
describe ( 'setMetadata' , ( ) => {
412
426
it ( 'should provide the proper request options' , done => {
427
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
413
428
appProfile . bigtable . request = ( config : any , callback : Function ) => {
414
429
assert . strictEqual ( config . client , 'BigtableInstanceAdminClient' ) ;
415
430
assert . strictEqual ( config . method , 'updateAppProfile' ) ;
@@ -423,6 +438,7 @@ describe('Bigtable/AppProfile', () => {
423
438
it ( 'should respect the description option' , done => {
424
439
const options = { description : 'my-description' } ;
425
440
441
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
426
442
appProfile . bigtable . request = ( config : any ) => {
427
443
assert (
428
444
config . reqOpts . updateMask . paths . indexOf ( 'description' ) !== - 1 ,
@@ -441,6 +457,7 @@ describe('Bigtable/AppProfile', () => {
441
457
it ( 'should respect the ignoreWarnings option' , done => {
442
458
const options = { ignoreWarnings : true } ;
443
459
460
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
444
461
appProfile . bigtable . request = ( config : any ) => {
445
462
assert . strictEqual ( config . reqOpts . ignoreWarnings , true ) ;
446
463
done ( ) ;
@@ -456,6 +473,7 @@ describe('Bigtable/AppProfile', () => {
456
473
it ( "has an 'any' value" , done => {
457
474
const options = { routing : 'any' } ;
458
475
476
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
459
477
appProfile . bigtable . request = ( config : any ) => {
460
478
assert (
461
479
config . reqOpts . updateMask . paths . indexOf (
@@ -476,6 +494,7 @@ describe('Bigtable/AppProfile', () => {
476
494
it ( 'has a cluster value' , done => {
477
495
const options = { routing : cluster } ;
478
496
497
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
479
498
appProfile . bigtable . request = ( config : any ) => {
480
499
assert (
481
500
config . reqOpts . updateMask . paths . indexOf (
@@ -497,7 +516,7 @@ describe('Bigtable/AppProfile', () => {
497
516
it ( 'should execute callback with all arguments' , done => {
498
517
const args = [ { } , { } , { } ] ;
499
518
appProfile . bigtable . request = ( config : { } , callback : Function ) => {
500
- callback . apply ( null , args ) ;
519
+ callback ( ... args ) ;
501
520
} ;
502
521
appProfile . setMetadata ( { } , ( ...argies : Array < { } > ) => {
503
522
assert . deepStrictEqual ( [ ] . slice . call ( argies ) , args ) ;
0 commit comments