pest-testing

Automate Pest PHP test creation, editing, and refactoring in Laravel projects.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/alslimany/tams --skill pest-testing-alslimany
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pest-testing
Source: https://github.com/alslimany/tams/tree/main/.junie/skills/pest-testing
Command: npx skills add https://github.com/alslimany/tams --skill pest-testing-alslimany

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining Pest PHP tests in Laravel projects can be repetitive and error-prone. This skill provides guidance to standardize Pest patterns, streamline test creation, and facilitate refactoring across a Laravel codebase.

Core Features & Use Cases

  • Supports Pest 4 syntax (test()/it()/expect()) for unit, feature, and browser tests.
  • Helps with mocking, datasets, and Livewire component tests, including refreshing the database as needed.
  • Useful for converting PHPUnit tests to Pest, implementing TDD workflows, and validating test coverage during refactors.

Quick Start

Create a Pest test in tests/Feature or tests/Unit using Pest syntax and run php artisan test to verify it passes.

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 project?

To write Pest PHP tests in Laravel, create test files in tests/Feature or tests/Unit using Pest 4 syntax like test(), it(), and expect(). You then execute the suite via php artisan test to verify your code passes.

Can I convert PHPUnit tests to Pest syntax in Laravel?

Yes, you can convert PHPUnit tests to Pest syntax. This skill assists with refactoring existing test suites by applying standardized Pest 4 patterns and organizing tests appropriately for the Laravel environment.

Does this approach support Livewire component testing and datasets?

Yes, Pest PHP testing supports Livewire component tests, datasets, and mocking. It handles database refreshing as needed, allowing you to validate Livewire components and complex data scenarios effectively.

What is the best way to organize feature and browser tests in Laravel?

The best way to organize Laravel tests is placing feature tests in tests/Feature and browser tests in tests/Browser. This skill standardizes test creation and refactoring workflows across these directories using Pest 4 syntax.

Do I need Pest 4 to run tests with php artisan test?

Yes, you need Pest 4 syntax to use this workflow. It requires proper test organization and Laravel environment setup to execute your unit, feature, and browser tests successfully with php artisan test.

Why use Pest for TDD workflows during Laravel refactoring?

Using Pest for TDD during refactoring validates test coverage and standardizes testing patterns. It streamlines test creation and editing, reducing repetitive errors when maintaining or refactoring your Laravel codebase.