paint-brush
How to Write Tests for React - Part 1 [Beginner's Guide]by@Kelvin9877
1,163 reads
1,163 reads

How to Write Tests for React - Part 1 [Beginner's Guide]

by Kelvin Liang13mJune 6th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This article is intended to who just start to learn React and wonder how to write some simple tests with React applications. Jest and React Testing Library are the tools chain behind the test, they both are ship with create-react-app by default. The default test is written by Jest using Jest, and it put.test.js suffix after App component name as its.name. It is the default conventions suggested by team (link here) Jest is importing from a global setup file if you wonder.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - How to Write Tests for React - Part 1 [Beginner's Guide]
Kelvin Liang HackerNoon profile picture
Kelvin Liang

Kelvin Liang

@Kelvin9877

IT Pro, Web Dev

About @Kelvin9877
LEARN MORE ABOUT @KELVIN9877'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Kelvin Liang HackerNoon profile picture
Kelvin Liang@Kelvin9877
IT Pro, Web Dev

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