pest-testing

Create and refine Pest PHP tests for Laravel projects.

3|Updated Jan 26, 2025
One-click install
npx skills add https://github.com/michaelnabil230/laravel-starter-kit --skill pest-testing-michaelnabil230
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pest-testing
Source: https://github.com/michaelnabil230/laravel-starter-kit/tree/main/.agents/skills/pest-testing
Command: npx skills add https://github.com/michaelnabil230/laravel-starter-kit --skill pest-testing-michaelnabil230

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create, fix, and refactor Laravel tests in Pest without wrestling with syntax, structure, or project conventions, so testing work stays fast and consistent.

Core Features & Use Cases

  • Pest test authoring: Write new tests using test() or it() with Laravel-friendly patterns.
  • Test maintenance: Convert PHPUnit tests to Pest, repair failing tests, and update assertions after code changes.
  • Advanced coverage: Support feature tests, unit tests, browser tests, smoke tests, datasets, mocking, and architecture checks.
  • Use case: When a Laravel feature changes, use this Skill to update the affected tests, keep conventions aligned with the existing suite, and run the smallest useful test set before finishing.

Quick Start

Ask me to write or fix a Pest test for your Laravel project, and I will produce the correct test code and testing guidance in Pest style.

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 tests for a Laravel project?

To write Pest tests for Laravel, use `test()` or `it()` syntax with Laravel-friendly patterns. This covers feature, unit, browser, smoke, and architecture testing scenarios while maintaining project conventions and appropriate assertions.

Can I convert existing PHPUnit tests to Pest syntax in Laravel?

Yes, you can convert PHPUnit tests to Pest syntax. This Skill refactors existing tests into Pest style, repairs failing tests, and updates assertions after code changes to keep your test suite consistent and fast.

Does this approach support datasets and mocking in Pest Laravel tests?

Yes, Pest Laravel testing supports datasets and mocking. You can implement advanced coverage including feature tests, unit tests, browser tests, smoke tests, datasets, mocking, and architecture checks within your testing workflow.

What's the best way to fix failing Pest tests after a Laravel feature changes?

The best way to fix failing Pest tests after a Laravel feature changes is to refactor the affected tests, align conventions with the existing suite, use RefreshDatabase when needed, and run the smallest useful test set before finishing.

Do I need Pest 4 syntax for testing Laravel applications?

Yes, Pest 4 syntax is required for creating and refining Laravel tests. This ensures proper use of Laravel test conventions, appropriate assertions, RefreshDatabase usage when needed, and practical test execution guidance across all testing scenarios.

How does TDD workflow integrate with Pest testing in Laravel?

TDD workflow integrates with Pest testing in Laravel by creating new tests using `test()` or `it()` patterns, supporting failing test repair, refactoring, and maintaining alignment with existing suite conventions throughout the development process.