Download the PHP package petecoop/pest-plugin-watch without Composer
On this page you can find all versions of the php package petecoop/pest-plugin-watch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download petecoop/pest-plugin-watch
More information about petecoop/pest-plugin-watch
Files in petecoop/pest-plugin-watch
Package pest-plugin-watch
Short Description A Pest plugin to watch your files and re-run tests on changes.
License MIT
Homepage https://github.com/petecoop/pest-plugin-watch
Informations about the package pest-plugin-watch
Pest Plugin Watch
A Pest plugin to watch files and restart Pest when they change.
This is a Pest Watch plugin that works with Pest v4 and differs from the official Pest Watch plugin which became unsupported. It's now built on the spatie/file-system-watcher package which uses the node package chokidar under the hood for efficient file watching.
Installation
You can install the package via composer:
In your project, you should have the JavaScript package chokidar installed. You can install it via npm
If you are using Bun, you can install it via:
The watcher will automatically use Bun if there is a bun.lock file in your project.
Usage
To start Pest in watch mode, run the following command:
This will restart Pest whenever a file in src, app or tests changes.
You can override the default paths by providing your own paths, for example inside your Pest.php file:
All versions of pest-plugin-watch with dependencies
pestphp/pest Version ^4.0.0
pestphp/pest-plugin Version ^4.0.0
spatie/file-system-watcher Version ^1.2