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
Individual unit tests should complete in milliseconds. Slow tests discourage frequent execution and break the TDD rhythm.
Incorrect (slow unit test):
test('validates user data', async () => {
// Real database connection - 50-200ms
const db = await connectToDatabase()
await db.seed(testData)
// Real API call - 100-500ms
const validationResult = await externalValidationService.validate(userData)
// File system operations - 10-50ms
await writeValidationReport(validationResult)
expect(validationResult.isValid).toBe(true)
})
// Total: 160-750ms per test
// 100 tests = 16-75 secondsCorrect (fast unit test):
test('validates user data format', () => {
// In-memory, no I/O
const userData = createUser({ email: 'valid@example.com', age: 25 })
const result = validateUserData(userData)
expect(result.isValid).toBe(true)
})
// Total: <5ms
test('returns errors for invalid email', () => {
const userData = createUser({ email: 'invalid' })
const result = validateUserData(userData)
expect(result.errors).toContain('Invalid email format')
})
// Total: <5ms
// 100 tests = <500msTechniques for fast tests:
Benchmarks:
Reference: The Practical Test Pyramid - Martin Fowler
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