Skip to content

Instantly share code, notes, and snippets.

@chrisbu
Created June 26, 2012 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisbu/2994941 to your computer and use it in GitHub Desktop.
Save chrisbu/2994941 to your computer and use it in GitHub Desktop.
Async test with dart:html
#import('dart:html');
#import("lib/unittest/unittest.dart");
#import("lib/unittest/html_config.dart");
void main() {
useHtmlConfiguration();
test('aync test', () {
window.setTimeout(expectAsync0(() {
print("timout occurred");
}), 1000);
});
}
@chrisbu
Copy link
Author

chrisbu commented Jun 26, 2012

The associated HTML file is here: https://gist.github.com/2994982

@loxal
Copy link

loxal commented Jun 26, 2012

two times #import('dart:html');?

@chrisbu
Copy link
Author

chrisbu commented Jun 26, 2012

Yep, copy/paste bug - fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment