Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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