Closed kuzeofficial closed 2 years ago
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.
Bug 🐞
What is the current behavior?
I have the following mixin![CleanShot 2022-07-13 at 20 00 43](https://user-images.githubusercontent.com/65286318/178851563-243725fc-0e83-425e-8fb0-7b0daf5e6271.png)
And the following text for mixin![CleanShot 2022-07-13 at 20 04 51](https://user-images.githubusercontent.com/65286318/178851733-8a462f14-b441-460c-9d42-d8413e7715ef.png)
The error when running the test is as follows![CleanShot 2022-07-13 at 20 06 38](https://user-images.githubusercontent.com/65286318/178851982-bb807672-cdb4-469a-98ac-c46afeef1e16.png)
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",