function ajax(successCallback) {
$.ajax({
url: 'server.php',
success: successCallback
});
}
and my tests is
test('asynchronous test', function () { // Pause the test
stop();
ajax(function () {
ok(true)
}) setTimeout(function () {
start();
}, 2000);
})
thanks