Search⌘ K
AI Features

Mantra

Explore how to test React components one piece at a time using Enzyme's shallow method and Jest for unit testing. Understand the value of isolating tests to prevent cascading failures and maintain clear, manageable test cases. This lesson guides you through setting up Babel and ESLint, and building a React carousel with test-driven development practices.

We'll cover the following...

Mantra: Test one piece at a time

There are two schools of thought on unit testing. One is that the tests should be as realistic as possible. In this view, tests against one component should depend on the behavior not only of that one component, but also of its dependencies. The other school of thought, the one applied in this course, is that tests should describe ...