Menu

1 / 4

How to set up Jest and Enzyme to test React Native apps

We’ve moved to freeCodeCamp.org/news - Medium·Sam Ollason·8 months ago
#p8pq0fX4
#mediumfreecodecamp#medium#jest#react#enzyme
Long article (916 words) — no AI summary yet.
Reading 0:00
15s threshold

React NativeJestUnit TestingTechProgramming How to set up Jest and Enzyme to test React Native apps

Sam Ollason

4 min readMay 20, 2019

--

This short article shares my experiences setting up my testing environment to unit test React Native components with Jest and Enzyme.

Press enter or click to view image in full size Photo by Neil Soni on Unsplash

Testing tools and environment

The first thing I learnt was the approach and infrastructure for writing unit tests for a React Native app are very similar to writing unit tests for a React app…perhaps unsurprisingly.

However, while the tooling and the use of the test suites are very similar, the testing environment and infrastructure have to be set up in a slightly different way .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.