Master Test-Driven Development with deterministic red-green-refactor workflows, test-first feature delivery, bug reproduction through failing tests, behavior-focused assertions, and refactoring safety; use when implementing new functions, changing APIs, fixing regressions, or restructuring code under test.
Does it follow best practices?
Evaluation — 86%
↑ 1.05xAgent success when using this tile
Validation for skill structure
Aim for high coverage on critical paths, not 100% everywhere. Coverage is a guide, not a goal - focus on meaningful tests over hitting numbers.
Incorrect (coverage as goal):
// Chasing 100% coverage
test('getter returns value', () => {
const user = new User({ name: 'Alice' })
expect(user.getName()).toBe('Alice') // Tests trivial getter
})
test('setter sets value', () => {
const user = new User({ name: 'Alice' })
user.setName('Bob')
expect(user.getName()).toBe('Bob') // Tests trivial setter
})
test('toString returns string', () => {
const user = new User({ name: 'Alice' })
expect(typeof user.toString()).toBe('string') // Meaningless test
})
// Result: 100% coverage, but critical business logic untested
// Tests don't prevent bugs, just satisfy metricCorrect (strategic coverage):
// High coverage on critical business logic
describe('PaymentProcessor', () => {
it('calculates tax correctly for each region', () => { /* ... */ })
it('applies discounts in correct order', () => { /* ... */ })
it('handles currency conversion', () => { /* ... */ })
it('prevents double-charging', () => { /* ... */ })
it('validates card details', () => { /* ... */ })
})
// 95% coverage on critical module
// Lower coverage acceptable on utilities
describe('StringUtils', () => {
it('capitalizes first letter', () => { /* ... */ })
// Don't test every edge case of simple utility
})
// 60% coverage acceptable on simple utilitiesCoverage strategy:
| Module Type | Target | Rationale |
|---|---|---|
| Business logic | 90%+ | Critical, complex |
| API handlers | 80%+ | User-facing |
| Utilities | 60%+ | Simple, stable |
| Generated code | 0% | Tested elsewhere |
Better metrics:
Reference: Code Coverage Best Practices - Google Testing Blog
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-developmentevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references