Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yadda overwrites existing non-Yadda test #78

Open
lolmaus opened this issue Aug 3, 2018 · 3 comments
Open

Yadda overwrites existing non-Yadda test #78

lolmaus opened this issue Aug 3, 2018 · 3 comments

Comments

@lolmaus
Copy link
Contributor

lolmaus commented Aug 3, 2018

Hi!

In my app I have a traditional tests/acceptance/foo-test.js and a new tests/acceptance/foo.feature.

Turns out, Yadda compiles the feature into a temporary file and puts it into the tests folder for QUnit to run.

The problem is that it overwrites the existing tests/acceptance/foo-test.js! The change persists since it's already under version control Tests still pass, so the autogenerated file can be checked into git by accident.

A simple solution could be to prefix autogenerated files with something a user would never write by hand, e. g. __yadda__foo-test.js instead of just foo-test.js.

@simonihmig
Copy link
Member

I see two basically separate issues mentioned here:

  • possibility of a name clash, which indeed can happen, and I don't see any reason not to implement some namespacing for the file like you suggested
  • if I understand you correctly, the generated tests/acceptance/foo-test.js is written not into some temporary broccoli folder in ./tmp (as it should be), but into your main project folder itself. Is that what you are saying? I can hardly imagine how this would be possible... 🤨

@lolmaus
Copy link
Contributor Author

lolmaus commented Aug 3, 2018

Yes and yes. My teammate @vvainio saw it as well on his machine.

@lolmaus
Copy link
Contributor Author

lolmaus commented Aug 6, 2018

Here it goes again:

screenshot

BTW, we're still on 0.2.3. Can't upgrade to 1.x without upgrading to Ember 3, which is a challenge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants