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

Fix issues with non-run wrapped store.createRecord #54

Closed
rwjblue opened this issue Nov 1, 2017 · 1 comment
Closed

Fix issues with non-run wrapped store.createRecord #54

rwjblue opened this issue Nov 1, 2017 · 1 comment
Labels

Comments

@rwjblue
Copy link
Member

rwjblue commented Nov 1, 2017

The codemod currently rewrites this.subject() within moduleForModel tests to:

    let subject = this.owner.lookup('service:store').createRecord('foo');

But due to emberjs/data#5247 in ember-data we actually must run-wrap the .createRecord call.

The output should become:

    let subject = run(() => this.owner.lookup('service:store').createRecord('foo'));

😭

@rwjblue rwjblue added the bug label Nov 1, 2017
@rwjblue
Copy link
Member Author

rwjblue commented Nov 1, 2017

Ugh. Looks like we will have to add import Ember from 'ember'; in this case, or hard code the requirement to use [email protected] to get the newer JS modules API for bringing in Ember.run.

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

No branches or pull requests

1 participant