返回 Skill 列表
extension
分类: 开发与工程无需 API Key

testing-test-writing

为使用Pest框架的核心用户流程和关键路径编写有针对性的测试,在开发过程中进行最少的测试,并在完成点进行策略性覆盖。在创建或编辑tests/Feature/或tests/Unit/目录下的测试文件时、编写具有描述性名称的Pest测试时、测试关键用户工作流和业务逻辑时、模拟外部依赖项时、实现快速单元测试时、测试行为而非实现细节时,或者在决定功能完成时需要哪些测试覆盖时,使用此技能。

person作者: jakexiaohubgithub

Testing Test Writing

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle testing test writing.

When to use this skill

  • When creating new test files in tests/Feature/ or tests/Unit/ directories
  • When writing Pest tests with descriptive, clear test names
  • When testing core user workflows and critical business paths
  • When deciding what needs test coverage at feature completion points
  • When mocking external dependencies (databases, APIs, file systems, services)
  • When writing fast-executing unit tests
  • When focusing tests on behavior and outcomes rather than implementation details
  • When using Pest datasets to handle multiple test scenarios efficiently
  • When testing validation rules, business logic, or API endpoints
  • When implementing integration tests for critical features
  • When running tests before committing code changes
  • When skipping tests for non-critical utilities or edge cases (until explicitly required)

Instructions

For details, refer to the information provided in this file: testing test writing