Thread
#compose
    Pedro Gomez

    Pedro Gomez

    3 years ago
    for unit testing, the "virtual dom" or whatever you want to call it could be the key to success
    Adam Powell

    Adam Powell

    3 years ago
    It's certainly in the plan to be able to interrogate a composed tree for testing, the types of questions you can ask it are what I'd like to be careful with to avoid brittle tests. If you're testing a NewsStoryCard that includes a HeadlineSnippet with two bits of text, it doesn't matter if HeadlineSnippet changes its implementation from two Text elements in a Column to a single Text element with a newline, for example. That sort of change ideally wouldn't break HeadlineCard tests.
    Pedro Gomez

    Pedro Gomez

    3 years ago
    yeap, you'd need testing tooling around to be able to just ask for part of the implementation as Enzyme does for React
    Adam Powell

    Adam Powell

    3 years ago
    yeah, which gets a lot more interesting as you start flattening that tree, or start from a pretty flat tree to begin with