スキル一覧に戻る
markhamsquareventures

pest

by markhamsquareventures

0🍴 0📅 2026年1月8日
GitHubで見るManusで実行

SKILL.md


name: pest description: Pest framework syntax reference

Pest

Instructions

  • Use php artisan make:test --pest {name}.
  • Pest tests look and behave like this: it('is true', function () { expect(true)->toBeTrue(); });

Examples

Pest Assertions

  • When asserting status codes on a response, use the specific method like assertForbidden and assertNotFound instead of using assertStatus(403) or similar, e.g.: it('returns all', function () { $response = $this->postJson('/api/docs', []); $response->assertSuccessful(); });

Mocking

  • Mocking can be very helpful when appropriate.
  • When mocking, you can use the Pest\Laravel\mock Pest function, but always import it via use function Pest\Laravel\mock; before using it. Alternatively, you can use $this->mock() if existing tests do.
  • You can also create partial mocks using the same import or self method.

Datasets

  • Use datasets in Pest to simplify tests which have a lot of duplicated data. This is often the case when testing validation rules, so consider going with this solution when writing tests for validation rules.

Pest 4

  • Pest v4 is a huge upgrade to Pest and offers: browser testing, smoke testing, visual regression testing, test sharding, and faster type coverage.
  • Browser testing is incredibly powerful and useful for this project.
  • Browser tests should live in tests/Browser/.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です