💼 This rule is enabled in the ✅ recommended
config.
Prevents invalid usage of test waiters.
The new test waiters APIs, found in the ember-test-waiters addon, have recommended best practices that ensure you are successful with their usage. This rule ensures that all usages are adhering to recommended best practices:
- Used in module scope
- Assigned to a variable
Examples of incorrect code for this rule:
import { buildWaiter } from 'ember-test-waiters';
function useWaiter() {
const myOtherWaiter = buildWaiter('the second'); // inside function
}
import { buildWaiter } from 'ember-test-waiters';
buildWaiter('the second'); // not stored in variable
Examples of correct code for this rule:
import { buildWaiter } from 'ember-test-waiters';
const myWaiter = buildWaiter('waiterName');
For more information on the new test waiters API, please visit ember-test-waiters.