by grncdr · 3y ago · 0 comments
I feel like the Jane Street approach of embedding the snapshots directly in test sources would make a qualitative difference to the ergonomics. The post implies that this requires some emacs integration, but there's no reason it couldn't be done by a test runner process instead. It would also be cool to have an LSP that provide a hover text or go-to-definition for externally stored snapshots.
> usually requiring all kinds of scaffolding and even resources like files, db, or mocked http requests
Yes, anything with timestamps or generated identifiers gets very annoying as you have to manually exclude certain data from the snapshots, negating some of the "easy wins" a snapshot/approval process provides for pure/idempotent code.