gkampitakis / go-snaps

Jest-like snapshot testing in Go 📸
https://pkg.go.dev/github.com/gkampitakis/go-snaps
MIT License
174 stars 6 forks source link

docs: improve `TestMain` references #86

Closed G-Rath closed 10 months ago

G-Rath commented 11 months ago

Traditionally the argument passed to TestMain is named m not t - I've also improved the grammer of a comment in one of the examples

gkampitakis commented 11 months ago

Hey 👋 thanks for another pr. Could you also please update the docs on the code on clean?

https://github.com/gkampitakis/go-snaps/blob/main/snaps/clean.go#L58 and https://github.com/gkampitakis/go-snaps/blob/main/snaps/clean.go#L69

G-Rath commented 11 months ago

Done! I'm also happy to do a follow-up PR updating the actual parameter once this is merged

gkampitakis commented 11 months ago

Feel free to do it into this pr. Sorry I also missed that TestMain exists in an example https://github.com/gkampitakis/go-snaps/blob/main/examples/matchSnapshot_test.go#L13-L19

G-Rath commented 11 months ago

Feel free to do it into this pr

I prefer keeping such things separate since they're not dependent in case one goes wrong i.e. if the variable naming turned out to somehow be breaking, then that can be reverted with just git revert without losing all these docs updates 🙂

gkampitakis commented 11 months ago

Fair 😄 . Pr looks good to me. Thanks again for the clean up 🙇 . Is it ready for merge?

G-Rath commented 10 months ago

Sorry I missed this comment - yup it should be good to go!