title: How can i mock AngularFirestore chained methods in jasmine?
body: <p>How can i mock angularfirestore and test the <strong>placeOrder</strong> method?</p>
  
  <pre><code>
  constructor(private afs: AngularFirestore) {}
  
  placeOrder(order: Order, restaurantId: string): Observable&lt;void&gt; {
     return from(this.afs.doc&lt;Order(`restaurants/${restaurantId}/orders/${order.id}`)
                         .set(order, { merge: true }));
  
  }
  </code></pre>