mocklets
Reusable standard mocks, stubs and fakes for popular browser API, library and framework objects based on Jest and Sinon.
Motivation
Everyone knows how hard software testing setup can be. When it comes to the testing pyramid, the most amount of work to be done is in creating fixtures (like mocks and fakes) and it can be quite daunting. The very popular testing frameworks for unit testing and e-to-e tests are good at providing the building blocks for creating mocks/stubs(spies)/fakes but how often do we have reuse the same building blocks to create the same exact mocks/stubs(spies)/fakes for different projects ? This is where mocklets come in. This project is a monorepo that provides usable and standard mocks/stubs/fakes for Jest and Sinon only.
Installation
Install using
npm
npm install @mocklets/jest
Or install using
yarn
yarn add @mocklets/sinon
License
MIT License
Contributing
If you wish to contribute to this project, you are very much welcome. Please, create an issue first before you proceed to create a PR (either to propose a feature or fix a bug). Make sure to clone the repo, checkout to a contribution branch and build the project before making modifications to the codebase.
Run all the following command (in order they appear) below:
$ npm run lint
$ npm run build
$ npm run test