This repository was built as a simple example to get started with mocking API calls in Jest.
For more information, check out the blog post: The only 3 steps you need to mock an API call in Jest.
This project requires Node.js.
Clone the repository and install the node dependencies
git clone https://github.com/ZakLaughton/simple-api-mocking-with-jest.git
cd simple-api-mocking-with-jest
npm install
- Run all tests:
npm test
- Run unmocked tests:
npm run test:unmocked
- Run mocked tests:
npm run test:mocked