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
Organize tests around features and behaviors that users care about, not around implementation methods. This makes tests serve as documentation.
Incorrect (grouped by method):
describe('UserService', () => {
describe('create', () => {
test('test 1', () => { /* ... */ })
test('test 2', () => { /* ... */ })
test('test 3', () => { /* ... */ })
})
describe('update', () => {
test('test 1', () => { /* ... */ })
test('test 2', () => { /* ... */ })
})
describe('delete', () => {
test('test 1', () => { /* ... */ })
})
})
// Reader doesn't know what behaviors are being testedCorrect (grouped by behavior):
describe('UserService', () => {
describe('user registration', () => {
it('creates user with provided email and name', () => { /* ... */ })
it('generates unique user ID', () => { /* ... */ })
it('sends welcome email to new user', () => { /* ... */ })
it('rejects duplicate email addresses', () => { /* ... */ })
it('validates email format', () => { /* ... */ })
})
describe('profile updates', () => {
it('updates user name', () => { /* ... */ })
it('validates new email before update', () => { /* ... */ })
it('sends verification email when email changes', () => { /* ... */ })
it('preserves unchanged fields', () => { /* ... */ })
})
describe('account deletion', () => {
it('removes user data', () => { /* ... */ })
it('cancels active subscriptions', () => { /* ... */ })
it('sends confirmation email', () => { /* ... */ })
})
})
// Tests read like feature documentationBenefits:
Reference: BDD and the Given-When-Then pattern
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-development@0.2.4evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references