Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 720 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 720 Bytes

Simple API Mocking with Jest

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.

Prerequisites

This project requires Node.js.

Installing

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

Testing

  • Run all tests: npm test
  • Run unmocked tests: npm run test:unmocked
  • Run mocked tests: npm run test:mocked