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

Tests fail after upgrading to 0.5.17 - unable to find custom store #130

Closed
toddjordan opened this issue Dec 9, 2015 · 7 comments
Closed
Labels

Comments

@toddjordan
Copy link

My team uses a extended store object that gets resolved by Ember at runtime because we put the file in services/store.js. Starting in the new release, our unit tests can't resolve our custom store, the unit test's resolver just gives us the ember one. How do I load my custom store object from a unit test?

As a workaround, I'm just going to refactor the test into an integration test, which does use the integrated store, but as a patch version upgrade, I wouldn't think I would be forced to do so...

@rwjblue
Copy link
Member

rwjblue commented Dec 9, 2015

@toddjordan - Is this a unit test? If so, is needs: ['service:store'] in place?

@rwjblue
Copy link
Member

rwjblue commented Dec 9, 2015

This is mostly a guess, but I believe this is because of the change that @nickiaconis and I did in #127.

Prior to that change, anything used/looked up during the initial registry setup would have been able to use the normal resolving process. This means that when we call DS._setupContainer here, Ember Data was still able to use the resolver to get the "real" service:store.

After the change, the registry passed to DS._setupContainer does not have a valid resolver attached to it, and therefore Ember Data's setup process is not able to find the custom store.

@toddjordan
Copy link
Author

Yeah, the needs was in place, but was loading the default store

@rwjblue
Copy link
Member

rwjblue commented Dec 9, 2015

@toddjordan - Gotcha, thanks. I'm trying to come up with a fix, shouldn't be long.

@toddjordan
Copy link
Author

thanks!

@toddjordan toddjordan changed the title Tests fail after upgrading to 0.5.17 - unabled to find custom store Tests fail after upgrading to 0.5.17 - unable to find custom store Dec 9, 2015
@Turbo87 Turbo87 added the bug label Feb 6, 2017
@Turbo87
Copy link
Member

Turbo87 commented Oct 14, 2017

@rwjblue @toddjordan is this issue still relevant?

@rwjblue
Copy link
Member

rwjblue commented Oct 14, 2017

I believe this was already addressed, happy to reopen if I'm incorrect...

@rwjblue rwjblue closed this as completed Oct 14, 2017
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

3 participants