diff --git a/navigation.php b/navigation.php index f805bc7..939ebf6 100644 --- a/navigation.php +++ b/navigation.php @@ -29,6 +29,7 @@ 'children' => [ 'Livewire' => 'docs/plugins/livewire', 'Faker' => 'docs/plugins/faker', + 'Watch' => 'docs/plugins/watch', ] ], 'Get involved' => [ diff --git a/source/docs/plugins/faker.md b/source/docs/plugins/faker.md index 3835d62..26314cd 100644 --- a/source/docs/plugins/faker.md +++ b/source/docs/plugins/faker.md @@ -24,7 +24,7 @@ The `faker()` function will create an instance of the Faker generator with the d ```php it('generates a name using faker', function () { $name = faker()->name; - + assertIsString($name); }); ``` @@ -35,11 +35,11 @@ creating the instance of the Faker generator. ```php it('generates a name using faker with locale', function () { $name = faker('fr_FR')->name; - + assertIsString($name); }); ``` Remember, for the full list of available Faker methods, please refer to the [Faker documentation](https://github.com/fzaninotto/Faker#formatters). -Next section: [Community →](/docs/community) +Next section: [Watch Plugin →](/docs/plugins/watch) diff --git a/source/docs/plugins/livewire.md b/source/docs/plugins/livewire.md index cf014a4..8ec3d11 100644 --- a/source/docs/plugins/livewire.md +++ b/source/docs/plugins/livewire.md @@ -46,4 +46,4 @@ it('can be decremented', function () { Remember, for the full list of available Livewire methods, please refer to the [Livewire documentation](https://laravel-livewire.com/docs/testing). -Next section: [Faker →](/docs/plugins/faker) +Next section: [Faker Plugin →](/docs/plugins/faker) diff --git a/source/docs/plugins/watch.md b/source/docs/plugins/watch.md new file mode 100644 index 0000000..e5dd1c7 --- /dev/null +++ b/source/docs/plugins/watch.md @@ -0,0 +1,35 @@ +--- +title: Watch Plugin +description: The Watch Plugin +extends: _layouts.documentation +section: content +--- + +# Watch Plugin + +The Watch plugin for Pest keeps an eye on your `tests/` folder and automatically run your Pest tests on file change. + +Follow these two steps to install it: + +1. [**Install fswatch**](https://github.com/emcrisostomo/fswatch#getting-fswatch) on your machine, or check if you already have it: + +```bash +fswatch --version +``` + +2. Install the Watch plugin using Composer: + +```bash +composer require pestphp/pest-plugin-watch --dev +``` + + +This will add a new option to your Pest CLI so you can start watching any updates on your `tests/` folder. + +**Just start Pest with the following command:** + +```bash +pest --watch # Night gathers, and now my watch begins +``` + +Next section: [Community →](/docs/community)