💼 This rule is enabled in the ✅ recommended
config.
QUnit 2.0 is deprecating QUnit.asyncTest()
in favor of assert.async()
within tests. This rule will flag asyncTest
and QUnit.asyncTest
calls and recommend that you use assert.async()
instead.
The following patterns are considered warnings:
asyncTest("Asynchronous test", function () { });
QUnit.asyncTest("Asynchronous test", function () { });
The following patterns are not considered warnings:
test("Synchronous test", function () { });
test("Asynchronous test", function (assert) {
var done = assert.async();
done();
});
QUnit.test("Synchronous test", function () { });
QUnit.test("Asynchronous test", function (assert) {
var done = assert.async();
done();
});
This rule can be safely disabled if you want to tolerate asynchronous test declarations, especially if your codebase does not use QUnit 2.0 syntax yet.