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
Tests should be straightforward sequences of setup, action, and verification. Conditionals, loops, and complex calculations in tests can contain bugs, making tests unreliable.
Incorrect (logic in tests):
test('calculates correct totals for all order types', () => {
const orderTypes = ['standard', 'express', 'overnight']
const expectedMultipliers = [1, 1.5, 2.5]
for (let i = 0; i < orderTypes.length; i++) {
const order = createOrder({ type: orderTypes[i], basePrice: 100 })
const total = calculateShipping(order)
// Bug: if expectedMultipliers array is wrong, test passes bad code
expect(total).toBe(100 * expectedMultipliers[i])
}
})
test('filters active users', () => {
const users = createUsers(10)
const activeUsers = users.filter(u => u.isActive) // Logic in test!
const result = filterActiveUsers(users)
// If filter logic is wrong in both places, test passes
expect(result).toEqual(activeUsers)
})Correct (explicit, linear tests):
test('standard shipping uses base price', () => {
const order = createOrder({ type: 'standard', basePrice: 100 })
const total = calculateShipping(order)
expect(total).toBe(100)
})
test('express shipping adds 50% surcharge', () => {
const order = createOrder({ type: 'express', basePrice: 100 })
const total = calculateShipping(order)
expect(total).toBe(150)
})
test('overnight shipping adds 150% surcharge', () => {
const order = createOrder({ type: 'overnight', basePrice: 100 })
const total = calculateShipping(order)
expect(total).toBe(250)
})
test('filterActiveUsers returns only active users', () => {
const activeUser = createUser({ isActive: true })
const inactiveUser = createUser({ isActive: false })
const result = filterActiveUsers([activeUser, inactiveUser])
expect(result).toEqual([activeUser])
})Exceptions:
test.each)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