simonihmig / ember-native-dom-helpers-codemod

Codemod to transform your jQuery based ember tests to use ember-native-dom-helpers
MIT License
27 stars 9 forks source link

Error when running integration transforms #30

Closed scalvert closed 6 years ago

scalvert commented 6 years ago

An error was occurring in the set-value.js transform for integration tests. Adding the path to isJQuerySelectExpression fixed this.

scalvert commented 6 years ago

@simonihmig @rwjblue

rwjblue commented 6 years ago

Just concerned that this were failing, but the last master build passed: https://travis-ci.org/simonihmig/ember-native-dom-helpers-codemod/builds/301658747

simonihmig commented 6 years ago

@scalvert thanks!

Seems good to me, is there a failing test that this fixes?

No, so far not. I added the third path argument recently for the jquery selector handling, to check the scope of the variable holding the selector. When the selector is given as a literal, the function exists early, and the missing path argument does not matter: https://github.com/simonihmig/ember-native-dom-helpers-codemod/blob/master/lib/utils.js#L70-L72. As most test fixtures for the various transforms are using just string literals as the selector, this error was not uncovered by any of those tests...