Self-taught developer and OSS enthusiast. I'm specialized in Front End development but I don't miss a chance to do JS anywhere, whether it's a browser, a mobile device, a server or a robot.
The thing with snapshots is that they are indeed useful to detect the impact of your UI changes across your components. The problem is that we overuse this to the point where we stop doing actual assertions and only do snapshots, which break every time anything changes and definitely put you into the "just update" mindset.
For now, I'm certainly moving towards more descriptive and precise assertions other than snapshotting everything. We certainly should be writing more tests following the @testing-library/react approach and doing more assertions with jest-dom matchers. This leads to more readable tests and less false alarms in your test suits.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I couldn't agree more.
The thing with snapshots is that they are indeed useful to detect the impact of your UI changes across your components. The problem is that we overuse this to the point where we stop doing actual assertions and only do snapshots, which break every time anything changes and definitely put you into the "just update" mindset.
For now, I'm certainly moving towards more descriptive and precise assertions other than snapshotting everything. We certainly should be writing more tests following the
@testing-library/react
approach and doing more assertions withjest-dom
matchers. This leads to more readable tests and less false alarms in your test suits.