kentcdodds / testing-react-apps

A workshop for testing react applications
https://www.epicreact.dev/modules/testing-react-apps-v1/testing-react-apps-welcome
Other
1.07k stars 719 forks source link

[Exercise - 6] Have a different test for checking spinner #56

Closed respel closed 3 years ago

respel commented 3 years ago

Hi I was working through this workshop and stumbled on exercise 6.

Checking the position, as well as the spinner in the same test, is leading it to be convoluted. Splitting it into two simplifies a lot of stuff.

My suggestion is to have a different test for checking the "loading" state.

kentcdodds commented 3 years ago

@respel,

Testing approaches (like all software) is more subjective than we sometimes think. I disagree with you, but I don't think that your suggestion is problematic at all.

In any case, we'll leave it as it is. Thanks anyway!