Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Async testing
// testharness.js
var t = async_test("Timeout times out");
setTimeout(t.step_func(function () {
assert_true(true);
t.done();
}), 100);
// Jasmine
describe("Timeout", function () {
it("times out", function () {
var result = false;
setTimeout(function () { result = true; }, 100);
waitsFor(function () { return result; });
runs(function () {
expect(result).toBeTruthy();
});
});
})
// QUnit
asyncTest("Timeout times out", function () {
setTimeout(function () {
ok(true, "true is true");
start();
}, 100);
});
// Mocha
describe("Timeout", function () {
it("times out", function (done) {
setTimeout(function () {
true.should.equal(true);
done();
}, 100);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.