https://github.com/lorcan/test-selectors-codemod
A codemode for fixing the ember-test-selectors testSelector helper deprecation
https://github.com/lorcan/test-selectors-codemod
Last synced: 6 months ago
JSON representation
A codemode for fixing the ember-test-selectors testSelector helper deprecation
- Host: GitHub
- URL: https://github.com/lorcan/test-selectors-codemod
- Owner: lorcan
- License: mit
- Created: 2017-08-25T19:42:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-29T06:23:49.000Z (almost 8 years ago)
- Last Synced: 2025-10-14T17:05:13.553Z (6 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 7
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ember - test-selectors-codemod - A codemode for fixing the ember-test-selectors testSelector helper deprecation. (Packages / Codemods)
- awesome-codemods - test-selectors-codemod - A codemode for fixing the ember-test-selectors testSelector helper deprecation. (Frameworks / Ember.js)
README
# test-selectors-codemod [](https://travis-ci.org/lorcan/test-selectors-codemod)
A codemode for fixing the ember-test-selectors testSelector helper deprecation.
Recently the [ember-test-selectors](https://github.com/simplabs/ember-test-selectors/pull/134) addon deprecated the `testSelector` function in favour of encoding the selectors directly ([here](https://github.com/simplabs/ember-test-selectors/pull/134)). This codemod automatically addresses the deprecation by transforming your tests to do the replacement automatically.
## Installation
[jscodeshift](https://github.com/facebook/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
```