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
Each test must run in isolation without depending on or affecting other tests. Shared state causes tests to pass or fail based on execution order.
Incorrect (shared mutable state):
// Shared across all tests in file
let userCount = 0
let database: User[] = []
test('creates first user', () => {
const user = createUser({ name: 'Alice' })
database.push(user)
userCount++
expect(database).toHaveLength(1)
expect(userCount).toBe(1)
})
test('creates second user', () => {
const user = createUser({ name: 'Bob' })
database.push(user)
userCount++
// Fails if tests run in different order or parallel
expect(database).toHaveLength(2)
expect(userCount).toBe(2)
})Correct (isolated state per test):
describe('createUser', () => {
let database: User[]
beforeEach(() => {
// Fresh state for each test
database = []
})
test('creates first user', () => {
const user = createUser({ name: 'Alice' })
database.push(user)
expect(database).toHaveLength(1)
})
test('creates second user', () => {
const user = createUser({ name: 'Bob' })
database.push(user)
// Always passes regardless of test order
expect(database).toHaveLength(1)
})
})Isolation techniques:
beforeEachReference: Software Testing Anti-patterns - Codepipes
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-developmentevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references