Skip to content

ZakLaughton/DEMO-simple-api-mocking-with-jest

Repository files navigation

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

About

A simple API mocking example with Jest.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published