com um clique
test-writing
Writes meaningful tests that actually catch bugs.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Writes meaningful tests that actually catch bugs.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Flags risky shell commands and unsafe tree ops.
Detects high-confidence security risks in code.
Surfaces the dojo's non-negotiable prime directives.
Activates the dojo framework at the start of a session.
Plans multi-step work before writing code.
Captures lessons and promotes recurring patterns.
| name | test-writing |
| description | Writes meaningful tests that actually catch bugs. |
| tier | practical |
| category | workflow |
| created_by | human |
| platforms | ["windows","macos","linux"] |
| tags | ["testing","tdd","quality"] |
| author | Andreas Wasita (@andreaswasita) |
Produces tests that fail when the code is wrong — not tests that exist for coverage theatre. Covers happy path, edge cases, error paths, and state transitions. Does NOT chase 100% coverage as a goal; chases meaningful coverage that catches real regressions.
verify-before-done skill flagged missing coverage.powershell tool.view, edit, and grep tools to read existing patterns.1. Read existing tests with `view`/`grep` to copy the project's pattern.
2. List scenarios: happy path, edges, errors, state transitions.
3. Write one test per scenario using Arrange-Act-Assert.
4. Run the suite — confirm new tests pass and nothing else broke.
5. If TDD: write the test first, watch it fail for the right reason, then implement.
| Stack | Framework | Run command |
|---|---|---|
| TypeScript | Vitest / Jest | npm test or npx vitest |
| Python | pytest | pytest or python -m pytest |
| Java | JUnit 5 | mvn test or gradle test |
| Go | testing | go test ./... |
| .NET | xUnit | dotnet test |
| Scenario type | Must cover |
|---|---|
| Happy path | Valid input → expected output |
| Edge case | Empty, null, boundary, maximum size |
| Error case | Invalid input, dependency failure, timeout |
| State transition | Stateful object moves between valid states |
Use grep for test_* or *.spec.* files and view one of them. Match the project's naming, location, fixtures, and assertion style. Do not introduce a second testing dialect.
For the code under test, list:
def test_calculate_discount_for_premium_user():
# Arrange
user = create_user(tier="premium")
order = create_order(total=100.00)
# Act
discount = calculate_discount(user, order)
# Assert
assert discount == 20.00
Name tests as documentation: test_login_with_expired_token_returns_401, not test_login.
Run the suite via the powershell tool. Capture pass/fail counts and paste them into the tasks/todo.md Verification Results block (per verify-before-done).
assert user is not None on a freshly constructed object).quicksort was called). Test the behavior.