pest-testing-conventions

仓库创建 2026年7月4日最近提交 22 天前SkillHot 收录 22 天前
▸ 精选理由

对 Laravel 项目中的测试编写与故障排查提供实用指导,降低调试成本。

这个 Skill 做什么

针对 Laravel 使用 Pest 4 的测试约定、调试与运行实践说明。

总结了 Laravel 项目里用 Pest 4 写测、调试和组织测试的常规做法,覆盖单元、功能、浏览器/烟雾测试以及断言习惯。写新测试、修复失败、或搭建数据集和 mock 时会用到这些约定。特别关注 PAO 模式、崩溃诊断和高阶断言,帮助测试更稳定、易维护。

▸ 展开 SKILL.md 英文原文

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.

开发编程Pest 测试Laravel 测试调试流程通用
0
Stars
0
Forks
23
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/ceilidhboy/skills/master/skills/pest-testing-conventions/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/ceilidhboy/skills/master/skills/pest-testing-conventions/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# 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 te
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有