DEV Community

Discussion on: What I've Learned About Testing React Apps - Unit Tests

Collapse
philsinsight profile image
Mr. Boateng

Great post, really good take on the benefits and the purpose of testing!

You mentioned that if a prop name changes that you don't want your test to break, I think I may have misunderstood this but in order to render the component you would need to specify props so wouldn't a name change always break your tests?

Collapse
thatzacdavis profile image
Zachary Davis

I agree, I think it depends on the prop being changed, but I've definitely had tests break after prop name changes because I was specifically using that prop.