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.
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
To download and run the code locally:
git clone https://github.com/lorcan/test-selectors-codemod
cd test-selectors-codemod
npm install
npm test
jscodeshift -t transforms/remove-test-selector-helper.js <path.to.test.directory>