paint-brush
API testing with Jestby@vnglst
151,976 reads
151,976 reads

API testing with Jest

by Koen van Gilst5mFebruary 5th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Jest is a great JavaScript testing framework by Facebook. It’s often used for testing React components, but is also a pretty good general purpose testing framework. Mocking API calls instead of testing with a real API is useful for a couple of reasons. It makes your tests ‘pure’, i.e. whether they fail or pass depends only on your code, and not on the data that the API returns. Using the official starter kit by Facebook, create-react-app. This comes with a working Jest configuration out of the box!

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - API testing with Jest
Koen van Gilst HackerNoon profile picture
Koen van Gilst

Koen van Gilst

@vnglst

Developer ~ JavaScript, Node & React ~ certified philosopher, ex-translator

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

About Author

Koen van Gilst HackerNoon profile picture
Koen van Gilst@vnglst
Developer ~ JavaScript, Node & React ~ certified philosopher, ex-translator

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