From 94ab042a0ae0f06a1e09957e9b710c6873f9640e Mon Sep 17 00:00:00 2001 From: Caneco Date: Tue, 9 Jun 2020 23:22:57 +0100 Subject: [PATCH 1/3] feat: add new Watch Plugin page --- navigation.php | 1 + source/docs/plugins/watch.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 source/docs/plugins/watch.md 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/watch.md b/source/docs/plugins/watch.md new file mode 100644 index 0000000..3d9a7cb --- /dev/null +++ b/source/docs/plugins/watch.md @@ -0,0 +1,28 @@ +--- +title: Watch Plugin +description: The Watch Plugin +extends: _layouts.documentation +section: content +--- + +# Watch Plugin + +The Watch Plugin for Pest allows keep an eye for the test folder and run your Pest tests. + +Install the plugin using Composer: + +```bash +composer require pestphp/pest-plugin-watch --dev +``` + +This will add 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 +``` + +**Attention:** To use this plugin you will need to have installed [`fswatch`](https://github.com/emcrisostomo/fswatch#installation) on your machine. + +Next section: [Community →](/docs/community) From e959d8a21e8ad355f6cf5d93fdc5e63bf7eaa68a Mon Sep 17 00:00:00 2001 From: Caneco Date: Tue, 9 Jun 2020 23:23:22 +0100 Subject: [PATCH 2/3] fix: changed the titles of the next page --- source/docs/plugins/faker.md | 6 +++--- source/docs/plugins/livewire.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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) From 17b4a9e46fd50a307273b0f1489e9b054ccff74f Mon Sep 17 00:00:00 2001 From: Alex Martin Date: Wed, 10 Jun 2020 11:40:22 +0200 Subject: [PATCH 3/3] Update watch.md Rewording --- source/docs/plugins/watch.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/source/docs/plugins/watch.md b/source/docs/plugins/watch.md index 3d9a7cb..e5dd1c7 100644 --- a/source/docs/plugins/watch.md +++ b/source/docs/plugins/watch.md @@ -7,15 +7,24 @@ section: content # Watch Plugin -The Watch Plugin for Pest allows keep an eye for the test folder and run your Pest tests. +The Watch plugin for Pest keeps an eye on your `tests/` folder and automatically run your Pest tests on file change. -Install the plugin using Composer: +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 new option to your Pest CLI so you can start watching any updates on your `tests/` folder. + +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:** @@ -23,6 +32,4 @@ This will add new option to your Pest CLI so you can start watching any updates pest --watch # Night gathers, and now my watch begins ``` -**Attention:** To use this plugin you will need to have installed [`fswatch`](https://github.com/emcrisostomo/fswatch#installation) on your machine. - Next section: [Community →](/docs/community)