mardi 31 juillet 2018

What are the differences between MockBackend and HttpTestController?

When testing Angular services, when might I use HttpTestingController.expectOne(...).flush(...) or similar, and when would it be better to use MockBackend.connections.subscribe(...). Are these just a matter of preference or are there clear use cases that lend themselves to one approach over the other?

Aucun commentaire:

Enregistrer un commentaire