@@ -6,7 +6,7 @@ import { SplitsCacheInLocal } from '../SplitsCacheInLocal';
66import { nearlyEqual } from '../../../__tests__/testUtils' ;
77import { MySegmentsCacheInLocal } from '../MySegmentsCacheInLocal' ;
88
9- const FULL_SETTINGS_HASH = '404832b3 ' ;
9+ const FULL_SETTINGS_HASH = 'dc1f9817 ' ;
1010
1111describe ( 'validateCache' , ( ) => {
1212 const keys = new KeyBuilderCS ( 'SPLITIO' , 'user' ) ;
@@ -77,15 +77,15 @@ describe('validateCache', () => {
7777 localStorage . setItem ( keys . buildSplitsTillKey ( ) , '1' ) ;
7878 localStorage . setItem ( keys . buildHashKey ( ) , FULL_SETTINGS_HASH ) ;
7979
80- expect ( validateCache ( { } , { ...fullSettings , core : { ...fullSettings . core , authorizationKey : 'another' } } , keys , splits , segments , largeSegments ) ) . toBe ( false ) ;
80+ expect ( validateCache ( { } , { ...fullSettings , core : { ...fullSettings . core , authorizationKey : 'another-sdk-key ' } } , keys , splits , segments , largeSegments ) ) . toBe ( false ) ;
8181
8282 expect ( logSpy ) . toHaveBeenCalledWith ( 'storage:localstorage: SDK key, flags filter criteria, or flags spec version has changed. Cleaning up cache' ) ;
8383
8484 expect ( splits . clear ) . toHaveBeenCalledTimes ( 1 ) ;
8585 expect ( segments . clear ) . toHaveBeenCalledTimes ( 1 ) ;
8686 expect ( largeSegments . clear ) . toHaveBeenCalledTimes ( 1 ) ;
8787
88- expect ( localStorage . getItem ( keys . buildHashKey ( ) ) ) . toBe ( 'aa4877c2 ' ) ;
88+ expect ( localStorage . getItem ( keys . buildHashKey ( ) ) ) . toBe ( '45c6ba5d ' ) ;
8989 expect ( nearlyEqual ( parseInt ( localStorage . getItem ( keys . buildLastClear ( ) ) as string ) , Date . now ( ) ) ) . toBe ( true ) ;
9090 } ) ;
9191
0 commit comments