Big Testing in React

Big Testing in React

Tests come in two sizes: Big and Small. Whereas a small test draws a short perimiter around a single component or group of components and validates the edge cases they contain, a big test incorporates as much of the actual system as possible, making sure that it works in harmony together.

Today, the React ecosystem has many high quality tools for writing small tests. That is, if we have a single component, we can achieve a high degree of certainty that it will work as expected in isolation. Alas, if only our users could use those same components in isolation, we wouldn't need to seek anything further! But they don't do they? They use them on different pages, apps, browsers, devices, and operating systems. They use them with real mice, and real keyboards to talk to real network services.

This talk will show you how to write big tests that measure your React code in a high-fidelity environment that simulates actual user interaction with your entire application. But big doesn't need to mean hard, nor does it need to mean brittle or slow. Done right, big tests are eaiser to write, resilient to change, and plenty fast.

97b6ab7f472930954c145ea8080b5742?s=128

Charles Lowell

September 11, 2017
Tweet