pest-testing

Write and refactor Pest PHP tests for Laravel applications.

1|1|Updated Jul 6, 2025
One-click install
npx skills add https://github.com/JayonLabs/StockEase --skill pest-testing-jayonlabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pest-testing
Source: https://github.com/JayonLabs/StockEase/tree/main/.agents/skills/pest-testing
Command: npx skills add https://github.com/JayonLabs/StockEase --skill pest-testing-jayonlabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the friction of writing, fixing, and refactoring PHP tests in Laravel by giving you clear Pest-specific guidance for modern test workflows.

Core Features & Use Cases

  • Pest 4 Test Authoring: Create Feature, Unit, and Browser tests using the correct test() and it() patterns.
  • Laravel Testing Workflows: Handle common needs like RefreshDatabase, mocking, datasets, Livewire component tests, smoke tests, and architecture checks.
  • Migration and Cleanup: Convert PHPUnit tests to Pest, repair broken tests after code changes, and keep test organization aligned with Laravel conventions.

Quick Start

Use the pest-testing skill to write or refactor a Laravel Pest test for the file or scenario I provide.

Frequently Asked Questions about pest-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Pest PHP tests for a Laravel application?

You can convert PHPUnit tests to Pest by refactoring them into Pest 4 syntax using `test()` and `it()` patterns. This migration process involves translating PHPUnit assertions and setup methods into Pest's expectation API and Laravel helper functions.

Does Pest 4 work with Livewire component tests and datasets?

Yes, Pest 4 works with Livewire component tests and datasets. You can handle common Laravel testing needs like mocking, Livewire coverage, and datasets by applying Pest-specific guidance to structure your test scenarios efficiently.

What is the best way to organize Laravel feature and unit tests using Pest?

The best way to organize Laravel Pest tests is to align with Laravel conventions by separating tests into tests/Feature, tests/Unit, and tests/Browser directories. This disciplined test organization ensures clarity across feature, unit, and browser testing workflows.

Why do my Pest tests break after refactoring my Laravel code?

Pest tests break after Laravel code changes when test expectations no longer match updated application logic. You can repair broken tests by refactoring the Pest PHP test scenarios to align with the new code structure and Laravel testing helper outputs.

Can I use Pest for architecture and smoke testing in Laravel?

Yes, you can use Pest for architecture and smoke testing in Laravel. Pest PHP testing workflows support architecture checks and smoke tests alongside standard feature and unit testing to validate your application's structural rules and basic functionality.