Ovidiu Cherecheș
Sep 8, 2018 · 1 min read

Thanks, Nir!

Regarding the child-parent dilemma, I recommend testing the entire dropdown component subtree as a unit. Render the parent, let the children render as well, and feel free to interact with/assess both during the test.

I recently (through another comment!) found a quote related to this that put my mind at ease: https://martinfowler.com/bliki/UnitTest.html.

“But really it’s a situational thing — the team decides what makes sense to be a unit for the purposes of their understanding of the system and its testing. Although I start with the notion of the unit being a class, I often take a bunch of closely related classes and treat them as a single unit.”

Conference wise, I will be giving a talk on testing in a few weeks and I’ll have the chance to renew my thoughts on this topic!

    Ovidiu Cherecheș

    Written by

    Slow thinker. INFJ. Fluent in JavaScript. Love to learn by creating. Evergreen newbie. https://ovidiu.ch