[Feature Request]: Expose `config` type
Closed this issue ยท 1 comments
jeremyhcho commented
๐ Feature Proposal
Make snaps.config
public
Motivation
I'm attempting to use the new MatchStandaloneSnapshot
along with the Ext
to create individual .json
snapshot files for my test. I'd like to set this behavior across all my tests.
Example
type TestSuite struct {
suite.Suite
Snapshots *snaps.Config
}
func (s *TestSuite) SetupSuite() {
return &TestSuite{
Snapshots: snaps.WithConfig(".json")
}
}
func (s *TestSuite) Test_Something() {
s.Snapshots.MatchStandaloneSnapshots(...)
}
This would give me the .json
behavior by default across all the tests in a suite. Thanks!
gkampitakis commented
Hey ๐ thanks for opening this issue, that's actually a good idea. Totally missed this use case ๐
. Will create a pr to expose the config
.