React Testing Library with Redux - Configuration

preview_player
Показать описание
Setting up React Testing Library with Redux. Solving error: "Can't find store. Wrap with Provider."

Create React App comes with React Testing Library by default 👍.

Solution #2 with more configuration, but cleaner tests:

Hope this helps!

-Andrew

Affiliate links to some of my gear 🤘🙏❤️
(Best quality for the best price from my research)
Рекомендации по теме
Комментарии
Автор

Great class, definitely like & subscribe.
Hopefully one day you use new redux toolkit

mauroinde
Автор

OMG I was dying for 1 and a half week to configure my project for unit testing. I was going insane because of all the errors. Thank you so much for this video!

yusufaltundal
Автор

I almost smashed my monitor trying to configure the render method with redux on my own. Your video helped to solve the problem.

antonarbus
Автор

Much appreciated! Testing is just what I'm learning right now and this is super helpful! 👨‍🏫👨‍💻

aleksandarhristov
Автор

Thank you, I had a different setup but your video helped me understand how to apply it.

Gelliny
Автор

Thank you so much! I appreciate this content greatly. Groovy ending.

whambalamb
Автор

Please, could you explain what should we do if the compone t that we test uses hook for getting data from backend using Redux Toolkit Query and createApi function

johnconnor
Автор

Man! Thank so much. Your video helpfully me.

felipemiguel
Автор

Would have been nice to explain briefly what some of the imports are for eg. Redux- Persist.

flowexe-lqmx
Автор

can you create video for class components instead of functional component?

shreyabhattad
Автор

When i pass my redux real store into Provider i can't see the logs outputs on my tests ): it doesn't matter if its a screen.debug() or a console inside the screen, it just doesn't show up. I tried mocking the store and the outputs started to show up again, do you perhaps know the cause of this? I would appreciate if you can help me, and thanks a lot for the video!!

randomicallyrandom
Автор

i tried it and it is working fine for normal components but when i am using it with components where redux is using with multiple actions then it gives error

imranhussain
Автор

And if you component has an update store value?

lesterisimoquantico
Автор

Why can t we just put the same store that we put in app

johnconnor