paint-brush
Unit Testing Redux Connected Componentsby@lukepierotti
100,627 reads
100,627 reads

Unit Testing Redux Connected Components

by Luke Pierotti7mNovember 25th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

When I did my previous <a href="https://hackernoon.com/implementing-basic-component-tests-using-jest-and-enzyme-d1d8788d627a" target="_blank">post</a>, I purposefully left out how to test connected components. With components that are connected to a Redux store, it takes a little bit more effort to set up test files and write tests. For this example I am using Jest and Enzyme to do my testing. I’ll talk a little about how to test these components using mock stores and mock functions.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Unit Testing Redux Connected Components
Luke Pierotti HackerNoon profile picture
Luke Pierotti

Luke Pierotti

@lukepierotti

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite