File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed
Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -128,17 +128,6 @@ export class Flagsmith {
128128 }
129129
130130 if ( ! ! data . cache ) {
131- const missingMethods : string [ ] = [ 'has' , 'get' , 'set' ] . filter (
132- method => data . cache && ! data . cache [ method ]
133- ) ;
134-
135- if ( missingMethods . length > 0 ) {
136- throw new Error (
137- `Please implement the following methods in your cache: ${ missingMethods . join (
138- ', '
139- ) } `
140- ) ;
141- }
142131 this . cache = data . cache ;
143132 }
144133
Original file line number Diff line number Diff line change @@ -4,15 +4,6 @@ beforeEach(() => {
44 vi . clearAllMocks ( ) ;
55} ) ;
66
7- test ( 'test_wrong_cache_interface_throws_an_error' , async ( ) => {
8- const cache = {
9- set : ( ) => { } ,
10- get : ( ) => { } ,
11- } ;
12-
13- expect ( ( ) => { const flg = flagsmith ( { cache } ) ; } ) . toThrow ( ) ;
14- } ) ;
15-
167test ( 'test_empty_cache_not_read_but_populated' , async ( ) => {
178 fetch . mockResolvedValue ( new Response ( flagsJSON ) ) ;
189
You can’t perform that action at this time.
0 commit comments