3 ms·
There's always the "Storybook approach" alternative: make sure all your UI components are individually renderable by pure props and then build standalone from y
by WorldMaker 4y ago
There's always the "Storybook approach" alternative: make sure all your UI components are individually renderable by pure props and then build standalone from your application story boards around those prop states.
I tend to find that more useful for UI testing than unit tests because it gives designers something to critique and often better fits how they want to work. (Versus trying to assert things like specific DIVs exists, which might get rearranged or eliminated in the next design change.)
It's easier to storyboard some complex component trees sometimes too.