Nir Radian
Sep 6, 2018 · 1 min read

How did they not accept you to a conference? This stuff is gold.

Also, I’m also where you are mentally but I’m going about it a bit differently. I think there is value in testing the lower level units separately and there is also value in testing the “glue” separately. (shameful plug https://medium.com/@nirradi/react-redux-unit-testing-strategy-that-makes-sense-2213e4e3654a)

A difficult part of the glue in my opinion is a component containing other components. eg. My form contains a drop-down. it(‘should fire the field change event when an element is selected in my dropdown.’). I’m definitely testing glue here. I don’t want to click about inside my form and dropdown, and also i don’t want to fire a fake onChange event, because I might screw up how a true on change event might be fired. What I really need is a way to say “when a user interacts with my component like this, expect parent to behave like that”, without messing around with the exact internals of the sub components. There is no way in react around this as far as I know wihtou

Thoughts?

    Nir Radian

    Written by