@@ -81,20 +81,6 @@ describe('remoteConfig()', function () {
81
81
} ) ;
82
82
} ) ;
83
83
84
- // TODO set up a mock for getAll from issue 5854 and probe if result is empty
85
- // describe('getAll() with remote', function () {
86
- // it('should return an object of all available values', function () {
87
- // const config = firebase.remoteConfig().getAll();
88
- // config.number.asNumber().should.equal(1337);
89
- // config.number.getSource().should.equal('remote');
90
- // // firebase console stores as a string
91
- // config.float.asNumber().should.equal(123.456);
92
- // config.float.getSource().should.equal('remote');
93
- // config.prefix_1.asNumber().should.equal(1);
94
- // config.prefix_1.getSource().should.equal('remote');
95
- // });
96
- // });
97
-
98
84
describe ( 'setDefaults()' , function ( ) {
99
85
it ( 'it throws if defaults object not provided' , function ( ) {
100
86
expect ( ( ) => {
@@ -112,4 +98,12 @@ describe('remoteConfig()', function () {
112
98
} ) . toThrow ( 'must be a string value' ) ;
113
99
} ) ;
114
100
} ) ;
101
+
102
+ describe ( 'getAll() should not crash' , function ( ) {
103
+ it ( 'should return an empty object pre-fetch, pre-defaults' , function ( ) {
104
+ const config = firebase . remoteConfig ( ) . getAll ( ) ;
105
+ expect ( config ) . toBeDefined ( ) ;
106
+ expect ( config ) . toEqual ( { } ) ;
107
+ } ) ;
108
+ } ) ;
115
109
} ) ;
0 commit comments