How to use the @angular/fire.AngularFireModule.initializeTestApp function in @angular/fire

To help you get started, we’ve selected a few @angular/fire examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular / angularfire / src / auth-guard / auth-guard.spec.ts View on Github external
beforeEach(() => {
        TestBed.configureTestingModule({
            imports: [
                AngularFireModule.initializeTestApp(COMMON_CONFIG),
                AngularFireAuthModule,
                AngularFireAuthGuardModule,
                RouterModule.forRoot([
                    { path: 'a', redirectTo: '/', canActivate: [AngularFireAuthGuard] }
                ])
            ],
            providers: [
                { provide: APP_BASE_HREF, useValue: 'http://localhost:4200/' }
            ]
        });
        inject([FirebaseApp, Router], (app_: FirebaseApp, router_: Router) => {
            app = app_;
            router = router_;
        })();
    });