Test steps:
- Unit Tests
- Integration Tests
- End to End
The core idea with unit testing is to test a function when giving it certain set of inputs. We cann a function with certain parameters and check we got the correct result or not.
It is good practice with Javascript code to have a directory called test/ in our project's root directory.
The Anatomy of unit Test:
Each unit test has the following Structure
- Test Setup
- Calling the tested method
- Asserting