spatie / phpunit-snapshot-assertions

A way to test without writing actual test cases
https://spatie.be/courses/testing-laravel-with-pest/snapshot-testing
MIT License
642 stars 71 forks source link

Allow using env var to manage snapshot creation and update #126

Closed mathieutu closed 3 years ago

mathieutu commented 3 years ago

fix #125

freekmurze commented 3 years ago

Looks good! Could you also mention these new env vars in the readme?

mathieutu commented 3 years ago

I've also added a mention to parallel testing to highlight it, in case of some devs are looking for the solution of their problems about that.

mfn commented 3 years ago

Random thought: would it make sense to promote using the env vars as being the preferred way and adjust the code checks and language used in the README?

I figure it certainly is more compatible and maybe the thought experiment for deprecating the -d --… approach could be done?

freekmurze commented 3 years ago

I figure it certainly is more compatible and maybe the thought experiment for deprecating the -d --… approach could be done?

I kinda like the -d -- approach to quickly rewrite snapshots when a failing tests is fixed.

freekmurze commented 3 years ago

It seems like tests are failing, could you take a look at that?

After the tests pass, I'll wait on a final stamp of approval by @sebastiandedeyne before merging and tagging this.

mathieutu commented 3 years ago

Actually suggestions are cools but no syntax checks or autocomplete! A semi is missing 😅

sebastiandedeyne commented 3 years ago

5d9da943af014-stamp-of-approval

freekmurze commented 3 years ago

Thank you!

mathieutu commented 3 years ago

Always my pleasure!