-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Change setupStore helper default serializer to JSONAPISerializer #4754
Comments
Hello I am new to open source and I would like to contribute to this project. -Thank you! |
hi @hd719 it's awesome that you want to help This is an issue around cleaning up the tests. In particular, when setting up a mock store, the default serializer is DS.JSONSerializer which is inconvenient because the internal representation is essentially json-api, so it would be much nicer to make it So doing this cleanup consists of
Just doing this is already useful, but the next step is to clean up the tests that break. Likely some of them will simply depend on manually specifying a serializer if they were relying on the current default of Here's an example of manually registering a serializer: https://github.com/emberjs/data/blob/master/tests/integration/store/query-record-test.js#L76 (note that |
I didn't see this ever get a PR with all the test changes so I went ahead with one. Chose to update test formats since I figured they were testing the "default" except in cases where it really seemed to have an intention of testing JSONSerializer specifically. One of my first ember-data PRs so happy for any feedback :) |
Closed by #5003 |
…rjs#4754 (emberjs#5003) * Change setupStore helper default serializer to JSONAPISerializer emberjs#4754 * Update test per review feedback
…rjs#4754 (emberjs#5003) * Change setupStore helper default serializer to JSONAPISerializer emberjs#4754 * Update test per review feedback
It's currently
JSONSerializer
which causes oddities during test refactoring, as many tests push json-api documents into the store and you sometimes want to refactor this to be the fulfillment value of an adapter method.The text was updated successfully, but these errors were encountered: