- Why testing ?
- Let's create a simple test asserter
- Install Jest
- Test JS
- Why react changed the idea of test
- Install Enzyme
- Configure Enzyme
- Go over how to check for number of elements and stuff like that with enzyme
- Check state and props with enzyme
- Snapshot testing and the difference between shallow, mount and render
- Snapshot testing
Create a simple test asserter:
- https://codesandbox.io/s/9ln6xkr62w
- https://codesandbox.io/s/504qo8vpln
Test JS:
- https://codesandbox.io/s/qlvm92z92j
- https://codesandbox.io/s/9zyn84lomp
- Exercise: https://codesandbox.io/s/z3w1k7nx94
- Exercise end: https://codesandbox.io/s/jj4wlm28k9
Test React:
- https://codesandbox.io/s/v3vnn457ol
- https://codesandbox.io/s/jj3qm99n4v
- Exercise: https://codesandbox.io/s/7wk640x9zq
- Exercise end: https://codesandbox.io/s/82l240qm7l
Test react with state and simulate clicks:
- https://codesandbox.io/s/34lm7yq87m
- https://codesandbox.io/s/2323v4vpwn
- Exercise: https://codesandbox.io/s/k9y4jkxo95
- Exercise end: https://codesandbox.io/s/k5x05k7z3