Closed ilyagr closed 10 months ago
At 1.1M recent downloads, I agree that this library merits a mention. I'm not sure "Golden testing" is an obvious way to describe it, though?
I nomally see this style of testing called "golden state" or "snapshot" testing. I prefer the latter term.
Other libs in this area are expect test (on mobile and don't remember how they join the words) and snapbox
. I say this for completenes and not to say one should be picked over another.
expect-test has 918k recent downloads, so maybe if we mention insta we should mention it, too?
snapbox has 180k recent downloads, so it's definitely in a different league.
expect-test mentions k9 but that only has 247k, downloads. expect-test makes it sound like it includes other things as well, so no idea how that might affect things.
Though snapbox is low on download counts, it is slightly different in that it targets snapshot testing of Command
and Path
. Again, not saying it should be listed but just including all relevant information.
Thanks! I haven't heard of expect-test
, but I find insta with its inline snapshots very pleasant. For example, all the diffs in the tests (all but one file) in https://github.com/martinvonz/jj/commit/5e407982b19793a7e240b2010e837e3b148a973f were auto-generated by cargo insta accept
.
I believe this is one that everybody should know about.