ember-codemods / ember-test-helpers-codemod

Codemod to transform your Ember tests to use @ember/test-helpers
MIT License
29 stars 14 forks source link

native-dom leaves unused selectors find & findAll #34

Open tmquinn opened 5 years ago

tmquinn commented 5 years ago

When native-dom transforms find(selector, context) or findAll(selector, context) the (now) unused specifiers remain in the import statement

tmquinn commented 5 years ago

ok, I think it is only transforming find(selector, context), but the actual issue is that it does not remove the selectors from the import

simonihmig commented 5 years ago

As you can see in the tests here, it should convert the imports, and prune unused ones.

Could you provide an example, where this does not work? Or even better a PR that leads to a failing test? (you just need to add a pair of *.input.js and *.output.js fixtures, with the output being the expected one!)