News for hackers. Stuff that matters.
Re:Tremor – The React library to build dashboards fast by cbovis on Saturday July 29, 2023 @04:42AM (#36918219)
This has been my experience in the past with a heavily snapshot covered codebase. Class names can change, the structure of your HTML can change, the underlying CSS can even change and the end result is still the same because you were just refactoring. At a large enough scale it can be painful to have hundreds of snapshots break for a simple change - especially when you add required code review by others into the mix.

Currently figuring out a strategy for introducing testing into an already large codebase and being very cautious of snapshot tests because of this. Experimenting with visual regression testing but early indicators suggest it could get very expensive if we're not careful about what is covered.

Re:Tremor – The React library to build dashboards fast by latchkey on Saturday July 29, 2023 @12:21PM (#36921742)
Give people the tools to easily update the snapshots and read the diff's of PR's (github is quite good at this imho).
Re:Tremor – The React library to build dashboards fast by c-hendricks on Saturday July 29, 2023 @06:28PM (#36925405)
I kinda think "just blindly update the snapshots" is teaching the wrong lesson. We removed them from our projects and haven't missed them.

Visual diffing, cypress >>>> snapshots IMO.

Re:Tremor – The React library to build dashboards fast by latchkey on Saturday July 29, 2023 @06:33PM (#36925458)
Who said blindly update snapshots?

Agreed that cypress today is probably a better solution.