File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,13 @@ describe('API tests', () => {
206
206
it ( 'throws retrieving a non existing App (default name)' , ( ) => {
207
207
expect ( ( ) => getApp ( ) ) . throws ( / N o F i r e b a s e A p p / ) ;
208
208
} ) ;
209
+
210
+ it ( 'does not throw on a non existing App (default name) if a defaults object exists' , ( ) => {
211
+ global . __FIREBASE_DEFAULTS__ = { config : { apiKey : 'abcd' } } ;
212
+ const app = getApp ( ) ;
213
+ expect ( app . options . apiKey ) . to . equal ( 'abcd' ) ;
214
+ global . __FIREBASE_DEFAULTS__ = undefined ;
215
+ } ) ;
209
216
} ) ;
210
217
211
218
describe ( 'getApps' , ( ) => {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const enum AppError {
34
34
const ERRORS : ErrorMap < AppError > = {
35
35
[ AppError . NO_APP ] :
36
36
"No Firebase App '{$appName}' has been created - " +
37
- 'call initializeApp()' ,
37
+ 'call initializeApp() first ' ,
38
38
[ AppError . BAD_APP_NAME ] : "Illegal App name: '{$appName}" ,
39
39
[ AppError . DUPLICATE_APP ] :
40
40
"Firebase App named '{$appName}' already exists with different options or config" ,
You can’t perform that action at this time.
0 commit comments