What should happen is, that when add1 is complete, then add2 should be called, and then add3, but with this code it does not work.
Add2 gets called to fast, and the same goes for add3.
asyncTest('add1', function () {
setTimeout(function () {
test(1==1, 'ok');
QUnit.start();
}, 500);
});
asyncTest('add2', function () {
setTimeout(function () {
test(2==2, 'ok');
QUnit.start();
}, 500);
});
asyncTest('add3', function () {
setTimeout(function () {
test(3==3, 'ok');
QUnit.start();
}, 500);
});
Aucun commentaire:
Enregistrer un commentaire