.gemini/skills/pest-testing/SKILL.md
Tests applications using the Pest 3 PHP framework. Activates when writing tests, creating unit or feature tests, adding assertions, testing Livewire components, architecture testing, debugging test failures, working with datasets or mocking; or when the user mentions test, spec, TDD, expects, assertion, coverage, or needs to verify functionality works.
npx skillsauth add jasonbaciulis/bedrock-demo pest-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Activate this skill when:
Use search-docs for detailed Pest 3 patterns and documentation.
All tests must be written using Pest. Use php artisan make:test --pest {name}.
tests/Feature and tests/Unit directories.it('is true', function () { expect(true)->toBeTrue(); });
</code-snippet>php artisan test --compact --filter=testName.php artisan test --compact.php artisan test --compact tests/Feature/ExampleTest.php.Use specific assertions (assertSuccessful(), assertNotFound()) instead of assertStatus():
it('returns all', function () { $this->postJson('/api/docs', [])->assertSuccessful(); });
</code-snippet>| Use | Instead of |
|-----|------------|
| assertSuccessful() | assertStatus(200) |
| assertNotFound() | assertStatus(404) |
| assertForbidden() | assertStatus(403) |
Import mock function before use: use function Pest\Laravel\mock;
Use datasets for repetitive tests (validation rules, etc.):
<code-snippet name="Pest Dataset Example" lang="php">it('has emails', function (string $email) { expect($email)->not->toBeEmpty(); })->with([ 'james' => '[email protected]', 'taylor' => '[email protected]', ]);
</code-snippet>Pest 3 includes architecture testing to enforce code conventions:
<code-snippet name="Architecture Test Example" lang="php">arch('controllers') ->expect('App\Http\Controllers') ->toExtendNothing() ->toHaveSuffix('Controller');
arch('models') ->expect('App\Models') ->toExtend('Illuminate\Database\Eloquent\Model');
arch('no debugging') ->expect(['dd', 'dump', 'ray']) ->not->toBeUsed();
</code-snippet>Pest 3 provides improved type coverage analysis. Run with --type-coverage flag.
use function Pest\Laravel\mock; before using mockassertStatus(200) instead of assertSuccessful()development
Styles applications using Tailwind CSS v4 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes.
tools
Control the user own Chrome browser via Playwriter extension with Playwright code snippets in a stateful local js sandbox via playwriter cli. Automate web interactions, take screenshots, inspect accessibility trees, debug & profile web applications. Run `playwriter skill` command to read the complete up to date skill
development
Styles applications using Tailwind CSS v4 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes.
tools
Control the user own Chrome browser via Playwriter extension with Playwright code snippets in a stateful local js sandbox via playwriter cli. Automate web interactions, take screenshots, inspect accessibility trees, debug & profile web applications. Run `playwriter skill` command to read the complete up to date skill