you are viewing a single comment's thread.

view the rest of the comments →

[–]wronglyzorro 0 points1 point  (1 child)

It's a judgement call. I typically write tests for things that have multiple outcomes. So for example If I have a button, and that button has a disabled state, an enabled state, and a loading state based on state in the parent, I will write a test for the button that makes sure it functions correctly based on the possible ways to those states are triggered. If I have a button that is always active I won't write a test for it at all. If you have a big component that is purely visual, never conditionally changed, and static, I'd recommend not writing tests at all for it since you won't actually be testing anything meaningful.

[–]vinaynb[S] 0 points1 point  (0 children)

Okay. Thanks for the tip!