File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -856,7 +856,12 @@ void main() {
856856 clearOnInit: true ,
857857 )));
858858
859- expect (mock.calls[mock.calls.length - 2 ].methodName, 'InfoLogger' );
859+ expect (mock.calls[mock.calls.length - 3 ].methodName, 'InfoLogger' );
860+ expect (mock.calls[mock.calls.length - 2 ].methodName, 'InLocalStorage' );
861+ expect (
862+ mock.calls[mock.calls.length - 2 ].methodArguments.map (jsAnyToDart), [
863+ {'type' : 'LOCALSTORAGE' , 'expirationDays' : 100 , 'clearOnInit' : true }
864+ ]);
860865
861866 expect (mock.calls.last.methodName, 'SplitFactory' );
862867 expect (
@@ -876,7 +881,7 @@ void main() {
876881 'urls' : {},
877882 'sync' : {},
878883 'debug' : {},
879- 'storage' : {'type' : 'LOCALSTORAGE' , 'expirationDays' : 100 , 'clearOnInit' : true }
884+ 'storage' : {}
880885 }));
881886
882887 mock.removeFactoryModules ();
Original file line number Diff line number Diff line change @@ -427,12 +427,21 @@ class SplitioMock {
427427 calls.add ((methodName: 'ErrorLogger' , methodArguments: []));
428428 return JSObject ();
429429 }.toJS);
430+ reflectSet (
431+ splitio,
432+ 'InLocalStorage' .toJS,
433+ (JS_ConfigurationStorage storageConfig) {
434+ calls.add (
435+ (methodName: 'InLocalStorage' , methodArguments: [storageConfig]));
436+ return JSObject ();
437+ }.toJS);
430438 }
431439
432440 void removeFactoryModules () {
433441 reflectSet (splitio, 'DebugLogger' .toJS, null );
434442 reflectSet (splitio, 'InfoLogger' .toJS, null );
435443 reflectSet (splitio, 'WarnLogger' .toJS, null );
436444 reflectSet (splitio, 'ErrorLogger' .toJS, null );
445+ reflectSet (splitio, 'InLocalStorage' .toJS, null );
437446 }
438447}
You can’t perform that action at this time.
0 commit comments