💼 This rule is enabled in the ✅ recommended config.
Use await instead of andThen test wait helper.
It's no longer necessary to use the andThen test wait helper now that the cleaner async/await syntax is available.
Examples of incorrect code for this rule:
test('behaves correctly', function (assert) {
click('.button');
andThen(() => {
assert.ok(this.myAction.calledOnce);
});
});Examples of correct code for this rule:
test('behaves correctly', async function (assert) {
await click('.button');
assert.ok(this.myAction.calledOnce);
});- async-await-codemod can help convert async function calls / promise chains to use
await - ember-test-helpers-codemod has transforms such as click that can be modified to call
makeAwait()anddropAndThen()on the function calls that you're trying to bring into compliance with this rule