[Feature request] Watch for changes
User story
- AS A software engineer doing test-driven development,
- I WANT TO run Pest with a
--watchflag and let Pest watch for changes and re-run tests, - SO THAT I don't need to switch to the terminal and manually re-run the tests after every single code change.
Acceptance criteria
- GIVEN I have run Pest with a
--watchflag, - WHEN I make a code change,
- THEN the tests are automatically re-run.
Context
There was a plugin called pestphp/pest-plugin-watch, and that worked very well, but it has been deprecated and archived. It is not compatible with Pest v4. We need first-class support for the ability to watch for changes and re-run the tests.
Related
#1376
@nunomaduro just to give a +1 for this feature. I love watch plugin and i am already using pest4 for company and personal projects and i am missing too much the watch plugin.
And thanks for pest4 this is the biggest test framework ever!!!
Agreed! The sweet spot is vendor/bin/pest --watch --dirty. Would be so slick and easy.
In case this helps others:
brew install watchexec
watchexec -w app -w tests -- vendor/bin/pest --dirty
It's really painful switching from text editor to terminal and re-running tests after every single code change.