ember-codemods / ember-module-migrator

Automated migration for new Ember application layout.
74 stars 15 forks source link

non standard test file renamed oddly #63

Closed ghost closed 6 years ago

ghost commented 7 years ago

Following the readme steps for an ember application I work on, I noticed one test file had an unusual name and path. Using ember-cli@2.15.1, node 8.5.

expectation

I expected this particular file to have a shorter path and filename.

result

Original file path: tests/integration/worker-export-test.js Migrated path: src/worker-export-test.js/worker-export/worker-export-test.j-integration-test.js

rwjblue commented 7 years ago

Yikes. Ya, so the reason this happens is that we are assuming the first path segment after tests/integration is the type (which is the more common setup). We can fix this by opting out of migration if the type isn’t in a known set of valid types.

ghost commented 7 years ago

Ah, thanks for the explanation. If I get some "free" time in the next few days, I'll take a stab at a PR for this.

ghost commented 6 years ago

I'm closing as I think it is an acceptable workaround to just move the test file into tests/integration/components/worker-export-test.