Making changes to the Gleam code generators: quick, easy
Updating the thousand or so codegen unit tests: pain
Conversation
Hey should I be using snapshot testing?
Is `insta` a good lib for that in Rust?
2
5
Looks nice, let's try it!
3
2
I use it for codespan - seems to work well!
1
Ooh I could use it for errors messages. I don't even have automated tests for them at the moment
1
Ohhh, more for just the console dump, I think we need a better solution for codespan
1
One thing I'd love (but haven't had the time to do) is to have a 'resolved' dignostic representation in codespan that could be independently rendered separated from the file DB. you could then serialise that and make layout-independent assertions on it.
1
1
And render a diff of the diagnostics on failure.
Serialising the diagnostics is also kind of important for letting people support accessibility tools, and something we currently do a really bad job of 😰

