Mocha is a javascript test framework which supports asynchronous testing, test coverage reports and use of any assertion library.
Chai is a BDD/TDD assertion library
Enjyme is a javascript testing utility for React that makes it easier to traverse and manipulate react component's output
Sinon is used for Spies/Stubs/Mocks. It can also fake ajax calls and timers. So basically it allows you solve problems which occur due to external dependencies.
- Spies - offers information about function cals
- Stubs - Which are like spies but completely replace the functions
- Mocks - It replaces the whole object by combining spies and stubs
yarn add --dev chai
yarn add --dev enzyme
yarn add --dev enzyme-adapter-react-16
yarn add --dev mocha
yarn add --dev @types/chai
yarn add --dev @types/enzyme
yarn add --dev @types/enzyme-adapter-react-16
yarn add --dev @types/mocha
yarn add --dev chai enzyme enzyme-adapter-react-16 mocha
yarn add --dev @types/chai @types/enzyme @types/enzyme-adapter-react-16 @types/mocha