How to use the @angular/fire/database-deprecated.onChildChanged 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 not duplicate the first item if it is the one that changed', () => {
        expect(
          onChildChanged([val1, val2, val3], val1, toKey, null!)
        ).not.toEqual([val1, val1, val2, val3]);
      });
github angular / angularfire / src / database-deprecated / firebase_list_factory.spec.ts View on Github external
it('should move the child after the specified prevKey', () => {
        expect(onChildChanged([val1, val2], val1, toKey, 'key2')).toEqual([val2, val1]);
      });
github angular / angularfire / src / database-deprecated / firebase_list_factory.spec.ts View on Github external
it('should move the child to the beginning if prevKey is null', () => {
        expect(
          onChildChanged([val1, val2, val3], val2, toKey, null!)
        ).toEqual([val2, val1, val3]);
      });
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, val2];
        expect(onChildChanged(inputArr, val1, toKey, 'key2')).not.toEqual(inputArr);
      });