Guidelines for #testing #react components
▻https://hackernoon.com/what-makes-a-good-test-dff3df6058a2?source=rss----3a8144eabfe3---4
What makes a good test?Outline of this articlePt 1: Why do we write tests? To prove our code works To protect our code from breaking when we work on it* To document behavior* To help make design decisionsPt 2: Testing practices* TDD Watch modePt 3: Testing React Recommended libraries* Snapshots vs assertions Rules of thumb for assertions Rules of thumb for snapshots* Black Box testing What is the public API for a React component? What is not part of the public API for a React component?Pt 4: More testing practices* Testing async code* Testing library code* Quotes about testingWhy do we write tests?To prove our code worksTo protect our code from breaking when we work on itTo document behaviorTo help make design decisionsTo prove our code worksTests should capture the intent of a (...)