Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 974 Bytes

File metadata and controls

42 lines (31 loc) · 974 Bytes

find

Usage

npx ember-test-helpers-codemod find path/of/files/ or/some**/*glob.js

# or

yarn global add ember-test-helpers-codemod
ember-test-helpers-codemod find path/of/files/ or/some**/*glob.js

Input / Output


find

Input (find.input.js):

import { find, findAll } from '@ember/test-helpers';

test('it renders', function(assert) {
  assert.equal(find('.foo').textContent.trim(), 'bar');
  assert.equal(findAll('.bar').length, 2);
});

Output (find.input.js):

test('it renders', function(assert) {
  assert.equal(this.element.querySelector('.foo').textContent.trim(), 'bar');
  assert.equal(this.element.querySelectorAll('.bar').length, 2);
});