Skip to content

Instantly share code, notes, and snippets.

@markuswustenberg
Created January 6, 2015 17:19
Show Gist options
  • Select an option

  • Save markuswustenberg/448274468c8773e9eb22 to your computer and use it in GitHub Desktop.

Select an option

Save markuswustenberg/448274468c8773e9eb22 to your computer and use it in GitHub Desktop.
AngularDart waitForHttp helper function
/// 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