gkampitakis / go-snaps

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

Feature request: support Property Matchers like Jest #18

Closed cdignam-segment closed 2 years ago

cdignam-segment commented 2 years ago

Jest has a great feature for matching specific types for fields: https://jestjs.io/docs/snapshot-testing#property-matchers

It would be great if this library also support this.

gkampitakis commented 2 years ago

Hey 👋 , thanks for creating this issue.

It's definitely an interesting feature but I would need to have to take some time and think about it. I am not sure how easily feasible is, ( need to play around with the idea ) and how well it could be combined with go-snaps in general. I ll look into and get back to this issue 😄

gkampitakis commented 2 years ago

It came to my attention this library https://github.com/maxatome/go-testdeep. Looks like it's a mature solution and a much better solution than what I'll come up with