.cursor/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 orlyapps/mathe-puzzle 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
Develops reactive Livewire 3 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior; writing Livewire tests; or when the user mentions Livewire, component, counter, or reactive UI.
development
Develops UIs with Flux UI Pro components. Activates when creating buttons, forms, modals, inputs, tables, charts, date pickers, or UI components; replacing HTML elements with Flux; working with flux: components; or when the user mentions Flux, component library, UI components, form fields, or asks about available Flux components.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.