⚛️ My React component unit testing strategy: Test each prop
⚛️ My React component unit testing strategy:
Test each prop.
Approach:
1. Split my VSCode window. I put the file under test on the left, and the test file on the right.
2. I read the props on the left-hand panel, and write a corresponding test for each.
Example: 👇
#react

When going through the list of props, I don't just write a test for each prop.
I also ask: "What *combinations* of props do I need to test to assure the component works as expected?"