August 2017
Beginner
374 pages
10h 41m
English
There are cases where your application would make requests to the outside world, such as fetching posts from an API. When running our tests, we still want to be able to see if the request would succeed, but not actually make the request. This is where mocking comes in handy.
There are two ways you can define mock functions with Jest:
Read now
Unlock full access