Comment

Comment by srcreigh

Rails has nice snapshot testing.

It’s not so hard to make this in any language. Just emit output to a text file and have a flag in your test command to overwrite the snapshots instead of asserting that the current output matches the snapshot.

I found that I didn’t even use assertions sometimes. I’d just check git to see if there’s a diff in the snapshots for refactoring

parent srcreigh 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton