Require use of Ember's find
helper instead of jQuery
for selecting elements in tests (square/use-ember-find
)
💼 This rule is enabled in the 🔥 ember
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
It is preferred to use Ember test helpers like find(selector)
instead of jQuery for selecting elements in tests.
This rule disallows jQuery for selecting elements in tests.
Due to its straightforward migration path, this rule can help serve as an incremental step towards eliminating all jQuery usage.
Examples of incorrect code for this rule:
$('.my-selector');
jQuery('.my-selector');
Examples of correct code for this rule:
find('.my-selector');
- See the documentation for Ember's
find
test helper - See the Ember Application Tests guide