Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.19 KB

no-invalid-test-waiters.md

File metadata and controls

44 lines (27 loc) · 1.19 KB

ember/no-invalid-test-waiters

💼 This rule is enabled in the ✅ recommended config.

Prevents invalid usage of test waiters.

Rule Details

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

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');

References

For more information on the new test waiters API, please visit ember-test-waiters.