- Install @reduxjs/toolkit and react-redux
- Build our store
- Connect our store to our app
- Slice (cartSlice)
- Dispatch (action)
- Selector
Types of testing (developer)
- Unit Testing
- Integration Testing
- End to End Testing - e2e testing
Setting up Testing in our app
- Install React Testing Library
- Install Jest
- Installed Babel dependencies
- Configure Babel
- Configure Parcel Config to disable default babel transpilation
- Jest - npx jest --init
- Install jsdom library
- Install @babel/preset-react - to make JSX work in test cases
- Include @babel/preset-react inside my babel configuration
- Install npm i -D @testing-library/jest-dom