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

Add transform for last() #38

Closed nlfurniss closed 4 years ago

nlfurniss commented 6 years ago

What this transform does: find(...).last() ===> findAll(...).slice(-1)[0]

Ideally one would use array[array.length - 1], but I didn't want to start adding variables to people's tests. Luckily, the slice method is about 10x faster than $(...).last()

simonihmig commented 6 years ago

The same concerns as in #37 apply here unfortunately!