go-approval-tests icon indicating copy to clipboard operation
go-approval-tests copied to clipboard

Feature request - allow overriding of filename

Open patmacpherson-sc opened this issue 3 years ago • 1 comments

Currently, the files are named after the executed test.

However, if you want to run multiple approvals in a single test (for example, with a table driven test) then the different approvals will overwrite each other.

It would be nice to have a function like-

func VerifyWithFilename(t Failable, reader io.Reader, filename string) 

which overrides the default naming behaviour.

patmacpherson-sc avatar Dec 22 '21 05:12 patmacpherson-sc

I think this can be easily added, I will work on a PR for it soon

hjwk avatar Jul 29 '22 13:07 hjwk