Problem with test createServerRootMixin with Jest
kuzeofficial opened this issue Β· comments
Bug π
What is the current behavior?
And the following text for mixin
The error when running the test is as follows
I am aware that it is not the SSR adaptation but I am using the createServerRootMixin because it globalizes the client, and does not reinstall it when reassembling the component, because I need two client instances each with a different API key.
What is the version you are using?
"vue-instantsearch": "4.4.0",
You're setting instantsearch
to null instead of exposing it from the parent component, that's likely what's causing the error. For more detailed debugging, we should have a reproduction and also what you're trying to assert in the test
I don't think it's that since I tried to mock this property as a function, I also renamed my client in the data in case an overwrite was happening with the mixin and this didn't work either, the use case to test would be that the client is instantiated and that the data() method information is correctly assigned to the provide.$_ais_ssrInstantSearchInstance property of the context, I'll try to create a sandbox and share it.