Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.3 KB

use-ember-find.md

File metadata and controls

42 lines (25 loc) · 1.3 KB

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.

Rule Details

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

Examples of incorrect code for this rule:

$('.my-selector');
jQuery('.my-selector');

Examples of correct code for this rule:

find('.my-selector');

Related Rules

References