/jest-set-clear-reset-stub

Set, reset and clear mocks, stubs and spies in Jest

Primary LanguageJavaScriptMIT LicenseMIT

How to set, reset and clear mocks, stubs and spies in Jest

Requirements

  • Node 10
  • Yarn 1.x or npm

Setup

  1. Clone the repository
  2. Run yarn or npm install installs all required dependencies.

npm scripts

Equivalent npm run <script> should also work

  • yarn test runs the tests with Jest
  • yarn lint will lint all of the files with xo
  • yarn format will run lint with --fix option on all the examples files (and tests).

LICENSE

Code is licensed under the MIT License.