Created
January 6, 2015 17:19
-
-
Save markuswustenberg/448274468c8773e9eb22 to your computer and use it in GitHub Desktop.
AngularDart waitForHttp helper function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// A little helper function to get the test to wait for the callback and | |
| /// simulate an implicit flush to the HTTP backend. | |
| void waitForHttp(Future future, Function callback) { | |
| future.then(expectAsync(callback)); | |
| inject((MockHttpBackend http) => http.flush()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment