@@ -7,7 +7,6 @@ import { fullSettings } from '../../../utils/settingsValidation/__tests__/settin
77
88test ( 'SPLIT CACHE / LocalStorage' , ( ) => {
99 const cache = new SplitsCacheInLocal ( fullSettings , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
10- cache . validateCache ( fullSettings ) ;
1110
1211 cache . clear ( ) ;
1312
@@ -41,7 +40,6 @@ test('SPLIT CACHE / LocalStorage', () => {
4140
4241test ( 'SPLIT CACHE / LocalStorage / Get Keys' , ( ) => {
4342 const cache = new SplitsCacheInLocal ( fullSettings , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
44- cache . validateCache ( fullSettings ) ;
4543
4644 cache . addSplit ( 'lol1' , something ) ;
4745 cache . addSplit ( 'lol2' , somethingElse ) ;
@@ -54,7 +52,6 @@ test('SPLIT CACHE / LocalStorage / Get Keys', () => {
5452
5553test ( 'SPLIT CACHE / LocalStorage / Add Splits' , ( ) => {
5654 const cache = new SplitsCacheInLocal ( fullSettings , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
57- cache . validateCache ( fullSettings ) ;
5855
5956 cache . addSplits ( [
6057 [ 'lol1' , something ] ,
@@ -69,7 +66,6 @@ test('SPLIT CACHE / LocalStorage / Add Splits', () => {
6966
7067test ( 'SPLIT CACHE / LocalStorage / trafficTypeExists and ttcache tests' , ( ) => {
7168 const cache = new SplitsCacheInLocal ( fullSettings , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
72- cache . validateCache ( fullSettings ) ;
7369
7470 cache . addSplits ( [ // loop of addSplit
7571 [ 'split1' , splitWithUserTT ] ,
@@ -108,7 +104,6 @@ test('SPLIT CACHE / LocalStorage / trafficTypeExists and ttcache tests', () => {
108104
109105test ( 'SPLIT CACHE / LocalStorage / killLocally' , ( ) => {
110106 const cache = new SplitsCacheInLocal ( fullSettings , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
111- cache . validateCache ( fullSettings ) ;
112107
113108 cache . addSplit ( 'lol1' , something ) ;
114109 cache . addSplit ( 'lol2' , somethingElse ) ;
@@ -142,7 +137,6 @@ test('SPLIT CACHE / LocalStorage / killLocally', () => {
142137
143138test ( 'SPLIT CACHE / LocalStorage / usesSegments' , ( ) => {
144139 const cache = new SplitsCacheInLocal ( fullSettings , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
145- cache . validateCache ( fullSettings ) ;
146140
147141 expect ( cache . usesSegments ( ) ) . toBe ( true ) ; // true initially, until data is synchronized
148142 cache . setChangeNumber ( 1 ) ; // to indicate that data has been synced.
@@ -174,7 +168,6 @@ test('SPLIT CACHE / LocalStorage / flag set cache tests', () => {
174168 }
175169 }
176170 } , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
177- cache . validateCache ( fullSettings ) ;
178171
179172 const emptySet = new Set ( [ ] ) ;
180173
@@ -216,7 +209,6 @@ test('SPLIT CACHE / LocalStorage / flag set cache tests', () => {
216209// if FlagSets are not defined, it should store all FlagSets in memory.
217210test ( 'SPLIT CACHE / LocalStorage / flag set cache tests without filters' , ( ) => {
218211 const cache = new SplitsCacheInLocal ( fullSettings , new KeyBuilderCS ( 'SPLITIO' , 'user' ) ) ;
219- cache . validateCache ( fullSettings ) ;
220212
221213 const emptySet = new Set ( [ ] ) ;
222214
@@ -236,6 +228,5 @@ test('SPLIT CACHE / LocalStorage / flag set cache tests without filters', () =>
236228
237229 // Validate that the feature flag cache is cleared when calling `clear` method
238230 cache . clear ( ) ;
239- expect ( localStorage . length ) . toBe ( 1 ) ; // only 'SPLITIO.hash' should remain in localStorage
240- expect ( localStorage . key ( 0 ) ) . toBe ( 'SPLITIO.hash' ) ;
231+ expect ( localStorage . length ) . toBe ( 0 ) ;
241232} ) ;
0 commit comments