@@ -60,11 +60,10 @@ describe('asyncWithLDProvider', () => {
60
60
61
61
beforeEach ( ( ) => {
62
62
mockLDClient = {
63
- on : jest . fn ( ( e : string , cb : ( ) => void ) => {
63
+ on : jest . fn ( ( _e : string , cb : ( ) => void ) => {
64
64
cb ( ) ;
65
65
} ) ,
66
66
off : jest . fn ( ) ,
67
- // tslint:disable-next-line: no-unsafe-any
68
67
variation : jest . fn ( ( _ : string , v ) => v ) ,
69
68
waitForInitialization : jest . fn ( ) ,
70
69
} ;
@@ -210,7 +209,7 @@ describe('asyncWithLDProvider', () => {
210
209
} ) ;
211
210
212
211
test ( 'subscribe to changes with camelCase' , async ( ) => {
213
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
212
+ mockLDClient . on . mockImplementation ( ( _e : string , cb : ( c : LDFlagChangeset ) => void ) => {
214
213
cb ( { 'test-flag' : { current : false , previous : true } } ) ;
215
214
} ) ;
216
215
@@ -222,7 +221,7 @@ describe('asyncWithLDProvider', () => {
222
221
} ) ;
223
222
224
223
test ( 'subscribe to changes with kebab-case' , async ( ) => {
225
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
224
+ mockLDClient . on . mockImplementation ( ( _e : string , cb : ( c : LDFlagChangeset ) => void ) => {
226
225
cb ( { 'another-test-flag' : { current : false , previous : true } , 'test-flag' : { current : false , previous : true } } ) ;
227
226
} ) ;
228
227
const receivedNode = await renderWithConfig ( { clientSideID, reactOptions : { useCamelCaseFlagKeys : false } } ) ;
@@ -232,7 +231,7 @@ describe('asyncWithLDProvider', () => {
232
231
} ) ;
233
232
234
233
test ( 'consecutive flag changes gets stored in context correctly' , async ( ) => {
235
- mockLDClient . on . mockImplementationOnce ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
234
+ mockLDClient . on . mockImplementationOnce ( ( _e : string , cb : ( c : LDFlagChangeset ) => void ) => {
236
235
cb ( { 'another-test-flag' : { current : false , previous : true } } ) ;
237
236
238
237
// simulate second update
@@ -247,7 +246,7 @@ describe('asyncWithLDProvider', () => {
247
246
248
247
test ( 'ldClient bootstraps correctly' , async ( ) => {
249
248
// don't subscribe to changes to test bootstrap
250
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
249
+ mockLDClient . on . mockImplementation ( ( _e : string , _cb : ( c : LDFlagChangeset ) => void ) => {
251
250
return ;
252
251
} ) ;
253
252
options = {
@@ -261,7 +260,7 @@ describe('asyncWithLDProvider', () => {
261
260
} ) ;
262
261
263
262
test ( 'undefined bootstrap' , async ( ) => {
264
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
263
+ mockLDClient . on . mockImplementation ( ( _e : string , _cb : ( c : LDFlagChangeset ) => void ) => {
265
264
return ;
266
265
} ) ;
267
266
options = { ...options , bootstrap : undefined } ;
@@ -273,7 +272,7 @@ describe('asyncWithLDProvider', () => {
273
272
} ) ;
274
273
275
274
test ( 'bootstrap used if there is a timeout' , async ( ) => {
276
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
275
+ mockLDClient . on . mockImplementation ( ( _e : string , _cb : ( c : LDFlagChangeset ) => void ) => {
277
276
return ;
278
277
} ) ;
279
278
rejectWaitForInitialization ( ) ;
@@ -287,7 +286,7 @@ describe('asyncWithLDProvider', () => {
287
286
288
287
test ( 'ldClient bootstraps with empty flags' , async ( ) => {
289
288
// don't subscribe to changes to test bootstrap
290
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
289
+ mockLDClient . on . mockImplementation ( ( _e : string , _cb : ( c : LDFlagChangeset ) => void ) => {
291
290
return ;
292
291
} ) ;
293
292
options = {
@@ -299,7 +298,7 @@ describe('asyncWithLDProvider', () => {
299
298
300
299
test ( 'ldClient bootstraps correctly with kebab-case' , async ( ) => {
301
300
// don't subscribe to changes to test bootstrap
302
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
301
+ mockLDClient . on . mockImplementation ( ( _e : string , _cb : ( c : LDFlagChangeset ) => void ) => {
303
302
return ;
304
303
} ) ;
305
304
options = {
@@ -340,7 +339,7 @@ describe('asyncWithLDProvider', () => {
340
339
} ) ;
341
340
342
341
test ( 'only updates to subscribed flags are pushed to the Provider' , async ( ) => {
343
- mockLDClient . on . mockImplementation ( ( e : string , cb : ( c : LDFlagChangeset ) => void ) => {
342
+ mockLDClient . on . mockImplementation ( ( _e : string , cb : ( c : LDFlagChangeset ) => void ) => {
344
343
cb ( { 'test-flag' : { current : false , previous : true } , 'another-test-flag' : { current : false , previous : true } } ) ;
345
344
} ) ;
346
345
options = { } ;
0 commit comments