[QUnit] Module lifecycle doesn't support asynchronous methods

[QUnit] Module lifecycle doesn't support asynchronous methods


Hi,
I discovered today the addition of setup and teardown to QUnit, great
work. But I quickly hit a limitation regarding start/stop.
The following test, will not work:
module("Asynchronous setup", {
setup: function() {
window.global_is_evil = false;
window.setTimeout(function() {
window.global_is_evil = true;
start();
}, 1000);
stop();
}
});
test("Test after an asynchronous setup", function() {
equals(window.global_is_evil, true, "Is global evil");
});
because setup and teardown aren't synced.
I filled up a ticket: http://dev.jquery.com/ticket/3628 (with pain,
dev.jquery.com is slow apparently)
The proposed patch also includes support for opera.postError in
addition to console.*
Cheers,
--
Yoan Blanc