approvals / go-approval-tests

Apache License 2.0
86 stars 22 forks source link

Use the idiomatic testdata folder #23

Closed hjwk closed 3 years ago

hjwk commented 3 years ago

Solves #16

emilybache commented 3 years ago

I suspect this change will break people's existing test suites. I think we need to make the folder you put approved files in configurable as it is in other language versions like python.

hjwk commented 3 years ago

Ah yes, I had totally forgotten about that aspect. Then I will try to do as you suggest.

hjwk commented 3 years ago

I looked at Python's implementation and I was not really a fan of using a .json file as config so I tried to reuse the idea behind the UseReporter() function.

So to use a subfolder you either need to specify it in each Test function or use a TestMain()

emilybache commented 3 years ago

Thanks, this is better. Just that one comment if you could look at it?

emilybache commented 3 years ago

Thankyou!