Skip to content

Instantly share code, notes, and snippets.

@lsmith
Created May 24, 2012 22: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 lsmith/2784650 to your computer and use it in GitHub Desktop.
Save lsmith/2784650 to your computer and use it in GitHub Desktop.
var suite = new Y.Test.Suite("yo yo ma");
suite.add(new Y.Test.Case({
"foo should bar": function () {
var test = this,
node = Y.one('#foo');
node.on('focus', function () {
test.resume(function () {
// Assertions go here
});
});
// normalize browsers with sync and async focus behavior
Y.later(<I always forget the sig> function () {
node.focus();
});
test.wait();
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment