Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.2 KB

no-test-this-render.md

File metadata and controls

49 lines (33 loc) · 1.2 KB

ember/no-test-this-render

💼 This rule is enabled in the ✅ recommended config.

Ember's this.render/this.clearRender method and @ember/test-helpers's render/clearRender method are equivalent, but using @ember/test-helpers' render/clearRender method is the recommended approach.

Rule Details

The rule invites users to call @ember/test-helpers' render/clearRender method instead of this.render/this.clearRender in tests.

Examples

Examples of incorrect code for this rule:

test('baz', function (assert) {
  this.render();
});
test('baz', function (assert) {
  this.clearRender();
});

Examples of correct code for this rule:

import { render } from '@ember/test-helpers';

test('baz', function (assert) {
  render();
});
import { clearRender } from '@ember/test-helpers';

test('baz', function (assert) {
  clearRender();
});

References