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

installing into Ember 2.18 addon breaks all tests #323

Closed
BryanCrotaz opened this issue Feb 14, 2018 · 13 comments
Closed

installing into Ember 2.18 addon breaks all tests #323

BryanCrotaz opened this issue Feb 14, 2018 · 13 comments

Comments

@BryanCrotaz
Copy link

This seems like the same symptom as emberjs/ember-qunit#179.

Every unit and integration test now fails with undefined is not an object (evaluating 'module.setContext'). or you must set a resolver with testResolver.set(resolver)

The only change from tests running as normal was
ember install ember-test-helpers

@BryanCrotaz
Copy link
Author

npm uninstall ember-test-helpers
makes the tests pass again.

@BryanCrotaz
Copy link
Author

Reproduction:

ember addon repro-test-helper-bug
cd repro-test-helper-bug
ember g service example
ember serve

At this point all tests pass in the browser

ember install ember-test-helpers
ember serve

Now tests are broken as above.

@BryanCrotaz
Copy link
Author

@rwjblue managed to create a reproduction of the bug I originally reported elsewhere

@BryanCrotaz
Copy link
Author

v0.6.3 doesn't cause the problem

@BryanCrotaz
Copy link
Author

BryanCrotaz commented Feb 14, 2018

using latest master fails even worse:

rm -rf node_modules
npm i
ember s

Missing npm packages: 
Package: ember-test-helpers
  * Specified: git@github.com:emberjs/ember-test-helpers.git
  * Installed: (not installed)

Run `npm install` to install missing dependencies.



Stack Trace and Error Report: /var/folders/24/9c9x7j316gbd3z5wg84fghqc0000gn/T/error.dump.2b0d032746e946ea838b9cec63be2ce1.log
An error occurred in the constructor for ember-cli-dependency-checker at /Users/bryan/Projects/repro-helpers-bug/node_modules/ember-cli-dependency-checker

@BryanCrotaz
Copy link
Author

BryanCrotaz commented Feb 14, 2018

Works when installed via ember-qunit

@Turbo87
Copy link
Member

Turbo87 commented Feb 14, 2018

@BryanCrotaz the way this project should be used is through ember-qunit (or soon also ember-mocha), but you should not add an explicit dependency on it to your package.json. I guess the documentation on this needs to be a little more clear 🤔

@rwjblue
Copy link
Member

rwjblue commented Feb 14, 2018

It does seem odd to me that installing it as a direct dependency somehow makes it break though.

@BryanCrotaz
Copy link
Author

BryanCrotaz commented Feb 14, 2018

I would assume ember-qunit uses v0.6.3. v.0.7.x is badly broken by the looks of things.

@Turbo87
Copy link
Member

Turbo87 commented Feb 14, 2018

nope, ember-qunit uses v0.7.x. the older v0.6.x branch is not an Ember addon, so installing it does not actually have any effect.

@Turbo87
Copy link
Member

Turbo87 commented Mar 26, 2018

@rwjblue do we plan on fixing the situation or should we close this now that #334 is merged in?

@rwjblue
Copy link
Member

rwjblue commented Mar 26, 2018

I think we should prevent conflicting versions via an init time assertion or something

@stefanpenner
Copy link
Member

I don't believe we support this version any longer, due to this I believe we should close this issue. Please respond if you think I closed this in error

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

4 participants