Brittleness of snapshot tests

Agreed, path representations can be different on Windows. But isn’t this rather easy to work around? Windows understands the forward-slash as a path separator character (for a long time now), I don’t see any reason to use backslash on Windows. And printing an absolute path as part of a test would be inherently non-portable because of the filesystem (drive) differences, so no one would do that anyway…

With line endings, I feel like it’s simple to always enforce Unix line endings–git can do it for you.

But sure, there is a little bit of extra complexity and brittleness that comes with snapshot testing. Eg, we have to be careful not to snapshot random values or current timestamps which will change on the next run. I feel like these are easy to find and fix though. Personally, I have been using snapshot testing for years and basically never run into these issues. You only have to fix up the format of the snapshot printer once; from then onwards it’s solid.