10. Conclusion / Key Points Flashcards
1
Q
What’s the main benefit and drawback of testing?
A
It adds work, but saves time and money by preventing regression.
2
Q
Why is Jest significant?
A
Jest is a great test runner, and the one recommended by the React team.
3
Q
What properties does a mock have?
A
The same as the original, mocked object, but no side effects.
4
Q
What benefit does snapshot testing provide?
A
Preventing components from breaking unintentionally.
5
Q
What can be said about the testability of stateless React components vs the stateful ones?
A
Stateless React components are easier to test than stateful ones.