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

[CHORE tests] simplify setupStore registrations #6353

Merged
merged 4 commits into from
Aug 21, 2019

Conversation

runspired
Copy link
Contributor

This PR allows for more incremental migration away from createStore and setupStore to modern test syntax.

Specifically it

  • ensures that we aren't registering anything unneeded for tests currently
  • provides a path for registering a serializer for use with the test
  • encourages use of "application" adapter/serializer

cc @pete-the-pete @snewcomer

@runspired runspired requested a review from igorT August 20, 2019 20:18
@runspired runspired added the 🌲 Project Trim 🌲 PRs related to https://github.com/emberjs/data/issues/6166 label Aug 20, 2019
@runspired
Copy link
Contributor Author

runspired commented Aug 20, 2019

cc @HeroicEric

This complements #6347

Copy link
Contributor

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good step!

@@ -31,7 +30,6 @@ function initializeStore(registry) {
registerOptionsForType.call(registry, 'adapter', { singleton: false });
registry.register('serializer:-default', JSONSerializer);
registry.register('serializer:-rest', RESTSerializer);
registry.register('adapter:-rest', RESTAdapter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity - this isn't a "breaking" change, right? (still acclimating)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. The existence of this adapter was for tests and private. To use it folks would have had to discover it and looked it up via -rest manually. Given the easy of importing RESTAdapter and no evidence of usage I don’t believe we need to treat this as intimate.

packages/-ember-data/tests/helpers/store.js Show resolved Hide resolved
@runspired runspired changed the title [CHORE tests] simplify createStore registrations [CHORE tests] simplify setupStore registrations Aug 21, 2019
@runspired runspired merged commit 7bf35ab into master Aug 21, 2019
@delete-merged-branch delete-merged-branch bot deleted the chore/fallback-cleanup branch August 21, 2019 18:01
@runspired runspired mentioned this pull request Aug 23, 2019
65 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌲 Project Trim 🌲 PRs related to https://github.com/emberjs/data/issues/6166
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants