How to use the @angular/fire/database-deprecated.onChildAdded 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 / database-deprecated / firebase_list_factory.spec.ts View on Github external
it('should add the child after the prevKey', () => {
        expect(onChildAdded([val1, val2], val3, toKey, 'key1')).toEqual([val1, val3, val2]);
      });
github angular / angularfire / src / database-deprecated / firebase_list_factory.spec.ts View on Github external
it('should not mutate the input array', () => {
        let inputArr = [val1];
        expect(onChildAdded(inputArr, val2, toKey, 'key1')).not.toEqual(inputArr);
      });
    });