|
1 | | -import * as firebase from 'firebase/app'; |
| 1 | +import { DataSnapshot } from '@firebase/database-types'; |
2 | 2 | import { FirebaseApp, FirebaseAppConfig, AngularFireModule} from 'angularfire2'; |
3 | | -import { AngularFireDatabase, AngularFireDatabaseModule, FirebaseListObservable, |
4 | | - FirebaseListFactory, onChildAdded, onChildChanged, onChildRemoved, onChildUpdated, |
5 | | - FirebaseObjectFactory |
| 3 | +import { AngularFireDatabase, AngularFireDatabaseModule, FirebaseListObservable, |
| 4 | + FirebaseListFactory, onChildAdded, onChildChanged, onChildRemoved, onChildUpdated, |
| 5 | + FirebaseObjectFactory |
6 | 6 | } from 'angularfire2/database-deprecated'; |
7 | 7 | import { TestBed, inject } from '@angular/core/testing'; |
8 | 8 | import * as utils from './utils'; |
@@ -652,15 +652,15 @@ describe('FirebaseListFactory', () => { |
652 | 652 | }; |
653 | 653 |
|
654 | 654 | it('should return an object value with a $key property', () => { |
655 | | - const unwrapped = utils.unwrapMapFn(snapshot as firebase.database.DataSnapshot); |
| 655 | + const unwrapped = utils.unwrapMapFn(snapshot as DataSnapshot); |
656 | 656 | expect(unwrapped.$key).toEqual(snapshot.ref.key); |
657 | 657 | }); |
658 | 658 |
|
659 | 659 | it('should return an object value with a $value property if value is scalar', () => { |
660 | 660 | const existsFn = () => { return true; } |
661 | | - const unwrappedValue5 = utils.unwrapMapFn(Object.assign(snapshot, { val: () => 5, exists: existsFn }) as firebase.database.DataSnapshot); |
662 | | - const unwrappedValueFalse = utils.unwrapMapFn(Object.assign(snapshot, { val: () => false, exists: existsFn }) as firebase.database.DataSnapshot); |
663 | | - const unwrappedValueLol = utils.unwrapMapFn(Object.assign(snapshot, { val: () => 'lol', exists: existsFn }) as firebase.database.DataSnapshot); |
| 661 | + const unwrappedValue5 = utils.unwrapMapFn(Object.assign(snapshot, { val: () => 5, exists: existsFn }) as DataSnapshot); |
| 662 | + const unwrappedValueFalse = utils.unwrapMapFn(Object.assign(snapshot, { val: () => false, exists: existsFn }) as DataSnapshot); |
| 663 | + const unwrappedValueLol = utils.unwrapMapFn(Object.assign(snapshot, { val: () => 'lol', exists: existsFn }) as DataSnapshot); |
664 | 664 |
|
665 | 665 | expect(unwrappedValue5.$key).toEqual('key'); |
666 | 666 | expect(unwrappedValue5.$value).toEqual(5); |
|
0 commit comments