Before start coding your awesome React app, it is always a good idea to set up unit test infrastructure. Once test is set up, you can write tests whenever you feel necessary before waiting to complete the entire app development. Mocha is a JavaScript test framework that runs on Node.js. …
Enzyme is created by Airbnb for React component testing. You can easily test components’ output and it works with different testing frameworks like Mocha or Jest. This post focuses on setting up the test environment with Mocha for TypeScript. If you are used to JavaScript and fairly new to TypeScript, …