Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 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 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-29T06:23:49.000Z (over 6 years ago)
- Last Synced: 2024-10-05T17:23:49.893Z (4 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 7
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-codemods - test-selectors-codemod - A codemode for fixing the ember-test-selectors testSelector helper deprecation. (Frameworks / Ember.js)
README
# test-selectors-codemod [![Build Status](https://travis-ci.org/lorcan/test-selectors-codemod.svg?branch=master)](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
```