News for hackers. Stuff that matters.
Re:Tremor – The React library to build dashboards fast by latchkey on Saturday July 29, 2023 @01:15AM (#36917173)
It depends on the tool doing the diff on the snapshot and what you're putting into it to begin with. https://jestjs.io/docs/snapshot-testing

The components I test all use classes, so there aren't embedded styles. Occasionally the generated class names change across different versions, but it is a small price to pay and easy enough to just update the shots.

I'd also argue that I'd want that snapshot to fail. I'd want to know why someone made that change, especially if they were going in the other direction... f00 -> ff0000.

There are no comments on this comment yet.