Test a Render Prop!
enzyme
is a hugely popular library for testing React components. While contracting for Commercetools, me and my teammates found it a bit inconvenient to test render props with enzyme - and we had plenty of them after their epic rise in popularity. My coworker Tobi and I built an extension for enzyme
which removes the overhead of testing render props called @commercetools-frontend/enzyme-extensions
.
I wrote the "Test a Render Prop!" article as a homage to the hugely popular "Use a render prop!" article. It is supposed to be the missing testing section of the original.
The developers behind enzyme
have since reached out to us and we helped integrate the renderProp
test helper of enzyme-extensions
into the v3.8.0 release of enzyme
, which I'm very excited about!