@@ -70,7 +70,7 @@ describe('given a LDClientCompatImpl client with mocked browser client that is i
7070 await expect ( client . waitForInitialization ( ) ) . resolves . toBeUndefined ( ) ;
7171 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
7272 { kind : 'user' , key : 'user-key' } ,
73- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
73+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
7474 ) ;
7575 } ) ;
7676} ) ;
@@ -83,7 +83,7 @@ describe('given a LDClientCompatImpl client with mocked browser client that init
8383 mockBrowserClient . identify . mockImplementation (
8484 ( ) =>
8585 new Promise ( ( r ) => {
86- setTimeout ( r , 100 ) ;
86+ setTimeout ( ( ) => r ( { status : 'completed' } ) , 100 ) ;
8787 } ) ,
8888 ) ;
8989 client = new LDClientCompatImpl ( 'env-key' , { kind : 'user' , key : 'user-key' } ) ;
@@ -99,7 +99,10 @@ describe('given a LDClientCompatImpl client with mocked browser client that init
9999
100100 const result = await client . identify ( context ) ;
101101
102- expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith ( context , { hash : undefined } ) ;
102+ expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith ( context , {
103+ hash : undefined ,
104+ sheddable : false ,
105+ } ) ;
103106 expect ( result ) . toEqual ( mockFlags ) ;
104107 } ) ;
105108
@@ -168,7 +171,7 @@ describe('given a LDClientCompatImpl client with mocked browser client that init
168171 await expect ( client . waitForInitialization ( ) ) . resolves . toBeUndefined ( ) ;
169172 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
170173 { kind : 'user' , key : 'user-key' } ,
171- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
174+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
172175 ) ;
173176 } ) ;
174177
@@ -180,7 +183,7 @@ describe('given a LDClientCompatImpl client with mocked browser client that init
180183 await expect ( client . waitForInitialization ( ) ) . resolves . toBeUndefined ( ) ;
181184 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
182185 { kind : 'user' , key : 'user-key' } ,
183- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
186+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
184187 ) ;
185188 } ) ;
186189
@@ -191,7 +194,7 @@ describe('given a LDClientCompatImpl client with mocked browser client that init
191194 await expect ( client . waitUntilReady ( ) ) . resolves . toBeUndefined ( ) ;
192195 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
193196 { kind : 'user' , key : 'user-key' } ,
194- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
197+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
195198 ) ;
196199 } ) ;
197200
@@ -429,6 +432,7 @@ it('forwards bootstrap and hash to BrowserClient identify call', async () => {
429432 bootstrap : bootstrapData ,
430433 hash : 'someHash' ,
431434 noTimeout : true ,
435+ sheddable : false ,
432436 } ) ;
433437} ) ;
434438
@@ -453,7 +457,7 @@ describe('given a LDClientCompatImpl client with mocked browser client which fai
453457
454458 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
455459 { kind : 'user' , key : 'user-key' } ,
456- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
460+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
457461 ) ;
458462 } ) ;
459463
@@ -466,7 +470,7 @@ describe('given a LDClientCompatImpl client with mocked browser client which fai
466470
467471 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
468472 { kind : 'user' , key : 'user-key' } ,
469- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
473+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
470474 ) ;
471475 } ) ;
472476
@@ -477,7 +481,7 @@ describe('given a LDClientCompatImpl client with mocked browser client which fai
477481
478482 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
479483 { kind : 'user' , key : 'user-key' } ,
480- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
484+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
481485 ) ;
482486 } ) ;
483487
@@ -489,7 +493,7 @@ describe('given a LDClientCompatImpl client with mocked browser client which fai
489493
490494 expect ( mockBrowserClient . identify ) . toHaveBeenCalledWith (
491495 { kind : 'user' , key : 'user-key' } ,
492- { bootstrap : undefined , hash : undefined , noTimeout : true } ,
496+ { bootstrap : undefined , hash : undefined , noTimeout : true , sheddable : false } ,
493497 ) ;
494498 } ) ;
495499
0 commit comments