write-tests
Test coverage expectations and structure for agenteq's Vitest suite.
- License 许可
- MIT
- 所属仓库
- sunchayn/agenteq
- 最近更新
- 2026-10-29
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- write-tests
- description
- Test coverage expectations and structure for agenteq's Vitest suite.
03 SKILL.md 正文
Writing Tests
1. Test file granularity
Default: one test file per user-facing behavior, not per source file. Mirror the source path under tests/. Example: src/modules/agents/actions/detect-agents-action.ts pairs with tests/modules/agents/actions/detect-agents-action.test.ts.
- Most
actions/,services/,entities/files get their own same-named test file. - Files that exist only to collaborate on one behavior share one test file named for that behavior. Example: sync stages behind
artifactsManager.sync()go inartifacts-manager.test.ts. - Trivial one-liner: no dedicated test. Cover it through a higher-level test that exercises it.
data-transfer-objects/,types/,definitions/: may be covered indirectly by the module's higher-level test, if every distinct shape is hit. Add a direct test for atypes/factory's normalization branch only if no higher-level test exercises it.
2. Infrastructure services
filesystem, git, shell, env, terminal/input, terminal/output each keep a dedicated test file. Each wraps a distinct external resource with its own failure modes, so nothing groups them.
3. Related Skills
- General TypeScript conventions: write-typescript-code
04 同仓库更多 Skills
writing-commit-messages
Conventions for writing commit messages in this repo.
review-checklist
Checklist to run through before approving a pull request.
writing-commit-messages
Conventions for writing commit messages in this repo.
laravel-pint
Formats PHP code with Laravel Pint before a commit.
laravel-pint
Formats PHP code with Laravel Pint before a commit.
example-skill
Example skill synced by agenteq