React / Testing
May 4, 2019 ยท View on GitHub
Unit testing
What to test
- Conditionals (both sides)
- State and its changes
- Rendered components (e.g.
expect(wrapper.find(MyComponent)).toHaveLength(1);)
May 4, 2019 ยท View on GitHub
expect(wrapper.find(MyComponent)).toHaveLength(1);)