- Learn about different testing software classifications
- Define Jest and learn how it is used
- test reducers
- use snapshot testing
- Define and integrate enzyme
- test if Child Components are rendering
- test if Components are receiving and rendering props
To add Enzyme: $ yarn add enzyme enzyme-adapter-react-16
Create setup file called setupTests.js. add the following:
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
to run tests: $ yarn test (or npm test)
- export a 'non-connected' or 'non-combined' version of your components/reducers for easy testing