Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

Document use of Mock http backend for testing #2499

Open
wolfgangmeyers opened this issue Sep 28, 2016 · 3 comments
Open

Document use of Mock http backend for testing #2499

wolfgangmeyers opened this issue Sep 28, 2016 · 3 comments
Assignees

Comments

@wolfgangmeyers
Copy link

Documentation should provide concrete examples of how to properly use the mock http backend in jasmine tests. I've found varying examples on the internet (like http://chariotsolutions.com/blog/post/testing-http-services-angular-2-jasmine/) but it would be nice to have an official example in the angular docs.

@wolfgangmeyers
Copy link
Author

This would be particularly helpful, since articles like this one, which clearly show what I'm needing to do, are obsolete: http://stackoverflow.com/questions/38526079/how-to-use-mockbackend-in-angular2

@wolfgangmeyers
Copy link
Author

@wardbell
Copy link
Contributor

This is on our backlog and I hope to get to it soon. The testing doc sample includes a test that uses the MockBackend. We just haven't documented it yet.

See https://github.com/angular/angular.io/blob/master/public/docs/_examples/testing/ts/app/model/http-hero.service.spec.ts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants