Chin
Chin

Reputation: 12712

Qunit asyncTest doesn't resolve

Hi I'm setting up some async tests - before hand to check things are working ok, I've copied the following from the jquery site.

asyncTest("a test", function() {

      setTimeout(function(){
        start();
        ok(true, "always fine");
      }, 13);
    });

The test just runs and runs.

The runner just shows that the test is running;

Running Server Tests: a test 
Running: 
Server Tests: a test

Where could I be going wrong I wonder. I have require.js on the page but in this case surely that doesn't matter. Any advice/pointers much appreciated.

Upvotes: 0

Views: 1706

Answers (1)

Chin
Chin

Reputation: 12712

For anyone else that has the problem. this fixed it for me.

asyncTest("a test", 1, function() {

  setTimeout(function(){
    QUnit.start();
    ok(true, "always fine");
  }, 10);


});

In my case I had a function named start on the page - whoops!

Upvotes: 3

Related Questions