pest-testing-conventions
Pest 4 testing conventions, workflows, and troubleshooting for Laravel projects.
Skill by ceilidhboy
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ceilidhboy-pest-testing-conventions
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pest-testing-conventions
What's inside
- Skill name
pest-testing-conventions- Description
- Pest 4 testing conventions, workflows, and troubleshooting for Laravel projects. Activates when writing or debugging tests, working with browser/smoke/architecture tests, handling test output issues (PAO mode, crash diagnostics), setting up datasets or mocking, and following project conventions for assertions, higher-order expectations, and test organization.
- License
- MIT
- Instructions
- 106 lines in SKILL.md · view on GitHub
Files (6)
- SKILL.md
- assertions.md · references/
- common-pitfalls.md · references/
- deep-testing.md · references/
- features.md · references/
- test-organization.md · references/
SKILL.md (first lines)
# Pest Testing 4
## When to Apply
Activate this skill when:
- Creating new tests (unit, feature, or browser)
- Modifying existing tests
- Debugging test failures
- Working with browser testing or smoke testing
- Writing architecture tests or visual regression tests
## Documentation
Use `search-docs` for detailed Pest 4 patterns and documentation.
### Creating Tests
All tests must be written using Pest. Use `php artisan make:test --pest {name}`.
### Basic Test Structure
```php
it('is true', function () {
expect(true)
->toBeTrue();
});
```
The expect is on its own line with the actual expectations chained underneath.
### Running Tests
**Full test runs:** `php artisan test --parallel` (distributes across processes for speed)
**Quick iteration:** `php artisan test --compact --filter=testName`
Use `--parallel` for final verification before committing. Don't use `--parallel` for single files—it adds overhead with no benefit since tests in one file run in series.
**PAO output mode (Laravel 12+):** By default, test output is captured and shown as a compact JSON summary. If tests crash with no output or exit code 2, use `PAO_DISABLE=1 php artisan test ...` to get the raw PHP/Pest output and see the actual fatal error.
**Crashes without summary:** If the test run scrolls through green ticks then stops abruptly with no final summary and a non-zero exit code, a PHP fatal error likely killed the process mid-suite. This typically means a class definition error (e.g. extending a final class, interface method mismatch). Run `PAO_DISABLE=1 php -d display_errors=stderr vendor/bin/pest --filter=... 2>&1` on the affected test file to surface the actual fatal.
### TIA (Test Impact Analysis)
TIA runs only tests affected by your changes. Configured in `tests/Pest.php` with `pest()->tia()->directory('tests/.pest-tia-cache')->defaultBranch('master')->locally()`. The graph is committed to Git on master so worktrees and fresh clones get fast first runs.
- **Master worktree**: Changes visible in `git status`. To update the baseline: run `update-tia-baseline` (or `update-tia-baseline --push` to push immediately).
- **Non-master worktrees**: `--skip-worktree` is applied automatically by `setup-worktree`, hiding TIA changes from `git status`.
Script: `update-tia-baseline` (in `tool-scripts/worktree-setup/`).
## Assertions
> See [references/assertions.md](references/assertions.md) for **essential** guidance on assertion chaining patterns.
Use specific assertions (`assertSuccessful()`, `assertNotFound()`) instead of `assertStatus()`:
```php
it('returns all', function () {
$this->postJson('/api/docs', [])->assertSuccessful();
});
```
| Use | Instead of |
| -------------------- | ------------------- |
| `assertSuccessful()` | `assertStatus(200)` |
| `assertNotFound()` | `assertStatus(404)` |
| `assertForbidden()` | `assertStatus(403)` |
### Higher-Order Expectations
When asserting multiple properties on an object, set the subject to the root object and use higher-order expectations:
```php
it('user has correct data', function () {
$user = User::factory()->create(['name' => 'John', 'email' => 'john@example.com']);
expect($user)
->name->toBe('John')
->email->toBe('john@example.com');
});
```
## Datasets
Use datasets for repetitive tests (validation rules, etc.):
```php
it('has emails', function (string $email) {
expect($email)->not->toBeEmpty();
})->with([
'james' => 'james@laravel.com',
'taylor' => 'taylor@laravel.com',
]);
```
## Reference Files
- [Test Organization](references/test-organization.md) - Directory structure, feature vs unit tests
- [Assertions](references/assertions.md) - Chaining patterns and best practices
- [Deep Testing](references/deep-testing.md) - Testing with real dependencies, when to mock
- [Features](references/features.md) - Browser testing, smoke testing, architecture testing
- [Common Pitfalls](references/common-pitfalls.md) - What to avoidFrom ceilidhboy/skills, MIT.
More from ceilidhboy/skills
- 0.561score
action-pattern
ceilidhboy
Creating and using action classes to encapsulate business logic.
SkillAFreshness: AClaude Code +9 - 0.561score
routing-and-controllers
ceilidhboy
Creating or editing a controller, or adding or editing a route in this project.
SkillAFreshness: AClaude Code +9 - 0.555score
pr-review
ceilidhboy
Review a GitHub pull request by orchestrating reviewer + oracle sub-agents directly from the orchestrating session, consolidating their findings into a single…
SkillAFreshness: AClaude Code +9 - 0.529score
project-bootstrap
ceilidhboy
Use when setting up a new Laravel + Inertia + React project, onboarding a new project to company standards, or told to "apply company tooling" or "standardise…
SkillBFreshness: BClaude Code +9 - 0.529score
formatting-enforcement
ceilidhboy
Retrofit formatting enforcement onto an existing Laravel project that has accumulated drift (badly formatted code committed under an always-green lint CI) or…
SkillBFreshness: BClaude Code +9 - 0.525score
html-output
ceilidhboy
HTML output generator for output that would benefit from being presented in a visually rich document.
SkillBFreshness: BClaude Code +9 - 0.524score
serena-conventions
ceilidhboy
Use when navigating code with Serena tools — finding symbols, reading method bodies, inserting code, or deciding between Serena and context-mode for code tasks.
SkillBFreshness: BClaude Code +9 - 0.524score
github-cli-workarounds
ceilidhboy
Workarounds for shell escaping issues when using the GitHub CLI (`gh`) for creating issues, gists, and pull requests with content containing special…
SkillBFreshness: BClaude Code +9 - 0.521score
bug-fix
ceilidhboy
Activate before creating, modifying, or deleting any production code file.
SkillBFreshness: BClaude Code +9 - 0.520score
adr-creation
ceilidhboy
Creates and maintains dual-format ADRs — Markdown (source of truth for agents) and HTML (rich explainer for humans with diagrams).
SkillBFreshness: BClaude Code +9 - 0.474score
settings-system
ceilidhboy
Multi-tenant polymorphic settings system with agency-scoped records and global fallback chain.
SkillCFreshness: CClaude Code +9 - 0.474score
creating-pull-requests
ceilidhboy
Company pull request workflow and branch policy.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 2, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ceilidhboy/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ceilidhboy
- 0.561score
action-pattern
ceilidhboy
Creating and using action classes to encapsulate business logic.
SkillAFreshness: AClaude Code +9 - 0.561score
routing-and-controllers
ceilidhboy
Creating or editing a controller, or adding or editing a route in this project.
SkillAFreshness: AClaude Code +9 - 0.555score
pr-review
ceilidhboy
Review a GitHub pull request by orchestrating reviewer + oracle sub-agents directly from the orchestrating session, consolidating their findings into a single…
SkillAFreshness: AClaude Code +9 - 0.529score
project-bootstrap
ceilidhboy
Use when setting up a new Laravel + Inertia + React project, onboarding a new project to company standards, or told to "apply company tooling" or "standardise…
SkillBFreshness: BClaude Code +9 - 0.529score
formatting-enforcement
ceilidhboy
Retrofit formatting enforcement onto an existing Laravel project that has accumulated drift (badly formatted code committed under an always-green lint CI) or…
SkillBFreshness: BClaude Code +9 - 0.525score
html-output
ceilidhboy
HTML output generator for output that would benefit from being presented in a visually rich document.
SkillBFreshness: BClaude Code +9
Cite this page
pest-testing-conventions skill. Agent Mart. https://agentmart.dev/skills/ceilidhboy-pest-testing-conventions (last updated 2026-10-24)