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

setting Ember.testing to true #38

Closed
asurabhi opened this issue Apr 14, 2014 · 2 comments
Closed

setting Ember.testing to true #38

asurabhi opened this issue Apr 14, 2014 · 2 comments

Comments

@asurabhi
Copy link

Currently, ember-qunit sets Ember.testing to true on loading.
This is causing issues in my set-up, where i load ember-qunit and application. If ember-qunit is executed before the application, application initialization throws following assertion.

"You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in an Ember.run"

commenting out Ember.testing=true, solved the issue. I think it is better to allow user to set this by calling setupForTesting() on Application

@asurabhi
Copy link
Author

asurabhi commented May 6, 2014

I am using Karma-runner to run test cases. Using karma-requirejs to load application code, libraries and ember-qunit. To solve this issue i mentioned application as dependency to ember-qunit.

Are you planning to fix this or this issue cannot be fixed?

@fivetanley
Copy link
Member

You should follow the warning and wrap that code in Ember.run, I think this would be the case with ember's default testing helpers anyway. If you feel strongly that we should reopen this issue, please do, but your async stuff should be wrapped in an Ember.run anyway.

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