pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.41k stars 338 forks source link

[Bug]: --update-snapshots deletes all snapshots #1191

Closed fedeisas closed 1 week ago

fedeisas commented 2 months ago

What Happened

When running tests with --update-snapshots it deletes all the snapshots and recreates from scratch even if I'm running a single test. I went through docs and issues but couldn't find any flag to correct this and operate only on the affected snapshots. Is this by design? Thanks!

How to Reproduce

Run tests with --update-snapshots

Sample Repository

No response

Pest Version

latest

PHP Version

8.2

Operation System

macOS

Notes

No response

nunomaduro commented 1 week ago

yeah, feel free to contribute with something that changes this behavior. It's just the default behavior at the moment.