AgentSkillsCN

test-author

采用行为优先的测试方法;在实现之前,确保先失败再成功。

SKILL.md
--- frontmatter
name: test-author
description: Write behavior-first tests; ensure fail-first before implementation.

Workflow

  1. Identify best test layer (unit vs integration vs e2e) for the behavior.
  2. Add/modify tests so they express the acceptance criteria.
  3. Run tests and confirm they fail for the right reason.
  4. Record:
    • which test failed,
    • why it failed,
    • what minimal change should make it pass.

Rules

  • Test behavior, not structure.
  • Avoid asserting internal/private functions unless repo convention demands it.
  • Prefer table-driven tests for edge cases.