How to use the @angular/fire/database-deprecated.FirebaseObjectObservable 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_object_observable.spec.ts View on Github external
it('should throw an exception if set when not subscribed', () => {
      O = new FirebaseObjectObservable((observer: Observer) => { });

      expect(() => {
        O.set('foo');
      }).toThrowError('No ref specified for this Observable!')
    });
github angular / angularfire / src / database-deprecated / firebase_object_observable.spec.ts View on Github external
it('should return an instance of FirebaseObservable when calling operators', () => {
    let O = new FirebaseObjectObservable((observer: Observer) => { });
    expect(map.call(O, noop) instanceof FirebaseObjectObservable).toBe(true);
  });
github angular / angularfire / src / database-deprecated / firebase_object_observable.spec.ts View on Github external
it('should throw an exception if updated when not subscribed', () => {
      O = new FirebaseObjectObservable((observer: Observer) => { });

      expect(() => {
        O.update(updateObject);
      }).toThrowError('No ref specified for this Observable!')
    });
github angular / angularfire / src / database-deprecated / firebase_object_observable.spec.ts View on Github external
it('should throw an exception if removed when not subscribed', () => {
      O = new FirebaseObjectObservable((observer: Observer) => { });

      expect(() => {
        O.remove();
      }).toThrowError('No ref specified for this Observable!')
    });
github angular / angularfire / src / database-deprecated / firebase_object_observable.spec.ts View on Github external
inject([FirebaseApp, AngularFireDatabase], (_app: FirebaseApp, _db: AngularFireDatabase) => {
      app = _app;
      db = _db;
      ref = app.database().ref();
      O = new FirebaseObjectObservable((observer: Observer) => {
      }, ref);
    })();
  });