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

Destructuring of Ember.testing will not work. #17

Closed
rwjblue opened this issue Dec 17, 2017 · 3 comments
Closed

Destructuring of Ember.testing will not work. #17

rwjblue opened this issue Dec 17, 2017 · 3 comments

Comments

@rwjblue
Copy link

rwjblue commented Dec 17, 2017

Ember.testing is a getter/setter in Ember, and destructuring like this will only read its value at the time the module is evaluated. In this case, Ember.testing will most likely be false when the module is evaluated, then change to true during the test. This behavior somewhat recently changed in emberjs/ember-test-helpers#227 (which is included in [email protected] / [email protected]).

I believe the fix here would be to remove the destructuring, and use Ember.testing directly inline.

const {
run,
typeOf,
testing,
} = Ember;

if (!testing && IN_BROWSER) {
this._etCheckForUtag();
}

@tsteuwer
Copy link
Owner

tsteuwer commented Feb 4, 2018

Will do. Thanks for the heads up @rwjblue. I wonder why GitHub never sent me an email notification about a new issue. Lol

@rwjblue
Copy link
Author

rwjblue commented Feb 5, 2018

Haha, no problem! I struggle with missing notifications too...

tsteuwer added a commit that referenced this issue Feb 5, 2018
tsteuwer added a commit that referenced this issue Mar 23, 2018
Fixing #17 - removing destructuring of Ember.testing
@tsteuwer
Copy link
Owner

Fixed in release v0.5.2.

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