attempt 1
t.waitFor({
desc: "testing",
method: function() {
return (a == b);
},
callback: function() { next(); },
});
{ waitFor: function() { return a == b }, desc:"sup"}
t.waitFor({
desc: "testing",
method: function() {
return (a == b);
},
callback: function() { next(); },
});
{ waitFor: function() { return a == b }, desc:"sup"}
Read the API documentation
StartTest(function(t) {
t.chain(
function(next) {
t.waitFor({
description: "this never prints",
method: function() {
return (1 == 1);
},
callback: next,
});
},
function(next) {
t.pass("But this does print");
next();
}
);
});
StartTest(function(t) {
var counter = 0
t.chain(
function(next) {
t.waitFor({
description: "this never prints",
method: function() {
return counter++ == 5
},
callback: next,
});
},
function(next) {
t.pass("But this does print");
next();
}
);
});
Read the API documentation