Not working on helper unit tests
RobbieTheWagner opened this issue · 8 comments
I ran the codemod on https://github.com/shipshapecode/ember-math-helpers/tree/master/tests/unit/helpers and it did not modify any of the unit tests.
It also incorrectly added import { module } from 'qunit';
to tests/test-helper.js.
The issue is that those tests are already plain qunit tests. The codemod currently only attempts to transform test files that use moduleFor*. Seems reasonable to me to make this work though...
OK, so I think the path forward on this is to extract the bits that do nested module processing and add another transform to the repo that only does that part. It would be much less total logic I think (doesn't have to care about this.owner
, this.render
, this.register
, etc rewriting and whatnot).
Thoughts?
@rwjblue are you saying have two codemods, one for the moduleFor* case, and one for vanilla qunit?
I would vote to just do it all in one. If you're running the codemod, you probably want to opt in to the new syntax for all your tests.
Maybe we should do it all in the single one...
depends on how complex it will get, but I think we should start with a single one and if it gets to big we can still extract later
kk, sounds good to me