-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathanalytics.spec.ts
More file actions
36 lines (28 loc) · 952 Bytes
/
analytics.spec.ts
File metadata and controls
36 lines (28 loc) · 952 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
34
35
36
import { TestBed } from '@angular/core/testing';
import { AngularFireModule, FirebaseApp } from '@angular/fire';
import { AngularFireAnalytics, AngularFireAnalyticsModule } from './public_api';
import { COMMON_CONFIG } from '../test-config';
import { rando } from '../firestore/utils.spec';
describe('AngularFireAnalytics', () => {
let app: FirebaseApp;
let analytics: AngularFireAnalytics;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
AngularFireModule.initializeApp(COMMON_CONFIG, rando()),
AngularFireAnalyticsModule
]
});
app = TestBed.inject(FirebaseApp);
analytics = TestBed.inject(AngularFireAnalytics);
});
afterEach(() => {
app.delete();
});
it('should be exist', () => {
expect(analytics instanceof AngularFireAnalytics).toBe(true);
});
it('should have the Firebase Functions instance', () => {
expect(analytics.app).toBeDefined();
});
});