← ClaudeAtlas

pest-testinglisted

Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: test()/it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code.
paulocmguerreiro/findocprocessor-backend-laravel · ★ 0 · Testing & QA · score 75
Install: claude install-skill paulocmguerreiro/findocprocessor-backend-laravel
# Pest Testing 4 ## Pré-condição obrigatória — MCP laravel-boost Antes de escrever ou alterar qualquer teste, executar obrigatoriamente: 1. `search-docs` — queries temáticas relevantes para o contexto (ex: `"pest datasets"`, `"pest mocking"`, `"pest arch"`) 2. `database-schema` — **sempre** que os testes usem modelos ou factories que interajam com a BD Não saltar este passo. A sintaxe do Pest 4 difere de versões anteriores — `search-docs` garante exemplos correctos para a versão instalada. ## Documentation Use `search-docs` for detailed Pest 4 patterns and documentation. ## Basic Usage ### Creating Tests All tests must be written using Pest. Use `php artisan make:test --pest {name}`. The `{name}` argument should include only the path and test name, but should not include the test suite. - Incorrect: `php artisan make:test --pest Feature/SomeFeatureTest` will generate `tests/Feature/Feature/SomeFeatureTest.php` - Correct: `php artisan make:test --pest SomeControllerTest` will generate `tests/Feature/SomeControllerTest.php` - Incorrect: `php artisan make:test --pest --unit Unit/SomeServiceTest` will generate `tests/Unit/Unit/SomeServiceTest.php` - Correct: `php artisan make:test --pest --unit SomeServiceTest` will generate `tests/Unit/SomeServiceTest.php` ### Test Organization - Unit/Feature tests: `tests/Feature` and `tests/Unit` directories. - Browser tests: `tests/Browser/` directory. - Do NOT remove tests without approval - these are core application code. ###