Some people refer to this as TDD, but TDD (Test-Driven Development or Test-Driven Design) is a specific methodology of Testing, where the tests are written first and drive the design and implementation of the product.
Your tests are your first and best line of defense against software defects.
There are two goals of red green refactor.
Write your test, it should fail.
Write only enough code to make your test pass (and not a single keystroke more!)
it is testing the code without executing it.
Manually checking the code, requirement documents, and design documents to find errors. Hence, the name "static".
Prettier, ESLint
A unit test runs some code over a segment of your program checking the input and output.
These tests allow developers to check individual areas of a program to see where(and why) errors occur.
mocha, jest
Integration tests are used to test multiple, bigger units (components) in interaction, and can sometimes even span multiple systems.
The purpose of integration tests is to find bugs in the connections and dependencies between various components, such as: Passing invalid or incorrectly ordered arguments.
end to end testing, where we test the whole application together, and test it as a user would — essentially automating whatever the user does.
Jest is a fast JavaScript testing utility by Facebook that enables you to get started with testing your JavaScript code with zero configuration.
Jest acts as a test runner, assertion library, and mocking library.
Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components’ output.
npx create-react-app testing
cd testing
npm testnpm i enzyme enzyme-adapter-react-16