write-pest-test

Installation
SKILL.md

Write Pest PHP Test

When To Use

Use this skill when introducing tests for newly written features or writing regression tests using Pest PHP.

Workflow

  1. Verify setup: Ensure Pest is initialized in tests/Pest.php.
  2. Scaffold test file: Place files under tests/Feature/ or tests/Unit/ with .php suffix.
  3. Use descriptive test blocks: Write tests using it('does something', ...) or test('does something', ...).
  4. Mock Side-effects: Stub out mail, events, notifications, and queues.
  5. Assert JSON payloads & database state: Use Pest expectations $this->assertDatabaseHas() and $response->assertJson().

Examples

Good Example

Installs
2
GitHub Stars
1
First Seen
Jul 7, 2026
write-pest-test — alizharb/agent-skills