Import Mount commands from external library. #27346
Unanswered
Asiratlan
asked this question in
Component Testing
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there,
I have this custom mount command that wrap a tested component in providers to use Formik, React-Router and React-Redux, this command works properly into my project:
I have been trying to move this code from the supportFile into a reusable library that the supportFile would then import this way:
When I'm trying to execute my test I end up with the following error:
> Could not find "store" in the context of "Connect(ComponentToTest)". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to Connect(ComponentToTest) in connect options.
.Is there any reason why the Redux-Provider would not be working the same as if this command was hosted directly into the supportFile? The library should have all the required dependancy installed to work properly.
Beta Was this translation helpful? Give feedback.
All reactions