L
L
lil_web2020-02-05 11:24:31
Unit testing
lil_web, 2020-02-05 11:24:31

How to test a component that contains a component with Redux?

I need to write a test for a component Table. But this component contains a component Rowthat is connected to Redax via the connect hook. I can't just test Table:

TypeError: (0 , _reactRedux.connect) is not a function

and swearing at connect in a child component


How to solve this problem? What if you lock connect? But how to do that? Or what's the best way to do it?

Sandbox

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Zhivagin, 2020-02-05
@Krasnodar_etc

Can you show the code of the component for which you are writing tests and the test itself?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question