I'm trying to use QUnit with RequireJS and seeing intermittent strange behaviour. Sometimes QUnit fails to execute the assertions and reports (0,0,0) when there are assertions in the test. Other times tests are omitted altogether.
I'm trying to use it like this:
require(['some/thing'], function(thing) {
test("first", function() {});
test("second", function() {});
asyncTest("third", function() {});
});
Is QUnit intended to work in this way? i.e. at some point after the page loads, new tests (sync and async) are defined and run?
I made an example which uses setTimeout to simulate my situation: