pest icon indicating copy to clipboard operation
pest copied to clipboard

[Feature request] Watch for changes

Open paulshryock opened this issue 3 months ago • 3 comments

User story

  • AS A software engineer doing test-driven development,
  • I WANT TO run Pest with a --watch flag 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 --watch flag,
  • 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

paulshryock avatar Sep 09 '25 21:09 paulshryock

@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!!!

jleonardolemos avatar Sep 11 '25 13:09 jleonardolemos

Agreed! The sweet spot is vendor/bin/pest --watch --dirty. Would be so slick and easy.

joelstein avatar Sep 18 '25 17:09 joelstein

In case this helps others:

brew install watchexec
watchexec -w app -w tests -- vendor/bin/pest --dirty

joelstein avatar Sep 19 '25 13:09 joelstein

It's really painful switching from text editor to terminal and re-running tests after every single code change.

paulshryock avatar Dec 23 '25 16:12 paulshryock