The Watch plugin keeps an eye on your application and automatically runs your Pest tests when you change files inside specific directories.
Note: This is still a development package and needs further testing.
First, install fswatch on your machine, or check if you already have it:
Then, install the Watch Plugin via the Composer package manager:
1composer require pestphp/pest-plugin-watch --dev
Once the installation is finished, your Pest CLI will have a new
--watch option available.
pest --watch starts Pest in watch mode and, from this point on, any file modification inside the directories will trigger Pest to run your tests.
1pest --watch # Night gathers, and now my watch begins
By default, the Watch plugin observes the following directories:
If you need to watch a custom set of directories, just provide a comma-separated list to the
The command will watch the
Next section: Creating Plugins →