Skip to content

Commit d8ba8de

Browse files
committed
fix(FirebaseApp): Fix flaky test
Use done() instead of async()
1 parent 79b7b27 commit d8ba8de

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/angularfire2.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('angularfire', () => {
4747
it('should have the provided name', () => {
4848
expect(app.name).toBe(APP_NAME);
4949
})
50-
it('should use an already intialized firebase app if it exists', async(() => {
50+
it('should use an already intialized firebase app if it exists', done => {
5151
@NgModule({
5252
imports: [
5353
AngularFireModule.initializeApp(COMMON_CONFIG, APP_NAME),
@@ -65,7 +65,10 @@ describe('angularfire', () => {
6565
.then(moduleRef => {
6666
const ref = moduleRef.injector.get(FirebaseApp);
6767
expect(ref.name).toEqual(app.name);
68+
}).then(done, e => {
69+
fail(e);
70+
done()
6871
});
69-
}))
72+
})
7073
});
7174
});

0 commit comments

Comments
 (0)