Test Kitchen - A Recipe for Good Tests
Explore a comprehensive guide to writing effective tests in JavaScript during this 21-minute conference talk from React Summit Remote Edition 2021. Discover the key properties of good tests, including isolation, composability, and determinism, and learn how to implement these principles in practice. Examine the impact of well-written tests on your codebase and developer experience. Gain insights into when and how to run automated tests, strategies for making tests faster, and the importance of testing from a consumer perspective. Walk through practical examples, such as testing a counter component, and learn valuable tips for handling random numbers, extracting business logic, and addressing race conditions. Delve into topics like visual regression testing, creating readable tests, and determining which tests are necessary for your project. By the end of this talk, you'll have a solid foundation for improving your testing practices and creating more robust JavaScript applications.