Home

Awesome

test-selectors-codemod Build Status

A codemode for fixing the ember-test-selectors testSelector helper deprecation.

Recently the ember-test-selectors addon deprecated the testSelector function in favour of encoding the selectors directly (here). This codemod automatically addresses the deprecation by transforming your tests to do the replacement automatically.

Installation

jscodeshift is required to run this script. To run on your ./tests directory:

npm install -g jscodeshift
jscodeshift -t https://rawgit.com/lorcan/test-selectors-codemod/master/transforms/remove-test-selector-helper.js ./tests

Development

To download and run the code locally:

git clone https://github.com/lorcan/test-selectors-codemod
cd test-selectors-codemod
npm install

Run tests

npm test

Running the codemod

jscodeshift -t transforms/remove-test-selector-helper.js <path.to.test.directory>