-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathapp.spec.ts
More file actions
33 lines (27 loc) · 873 Bytes
/
app.spec.ts
File metadata and controls
33 lines (27 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { TestBed } from '@angular/core/testing';
import { FirebaseApp, initializeApp, provideFirebaseApp } from '@angular/fire/app';
import { COMMON_CONFIG } from '../test-config';
import { rando } from '../utils';
describe('FirebaseApp', () => {
let app: FirebaseApp;
let providedApp: FirebaseApp;
let appName: string;
describe('single injection', () => {
beforeEach(() => {
appName = rando();
TestBed.configureTestingModule({
providers: [
provideFirebaseApp(() => {
providedApp = initializeApp(COMMON_CONFIG, appName);
return providedApp;
})
],
});
app = TestBed.inject(FirebaseApp);
});
it('should be injectable', () => {
expect(app).toBeTruthy();
expect(app).toEqual(providedApp);
});
});
});