Things need testing on React
Today, we will learn about what should we test when create unit and integration test on react project. There are several thing should we test it is
Unit testing
- Function can run correctly
- Function does't have error
- The result of function is as we expect
Integration testing
- Component can render
- Component does't have error
- Component have text as expect
- The component have label according with the data sent via props