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
A test without assertions always passes, providing false confidence. Every test must verify expected outcomes through explicit assertions.
Incorrect (no assertions):
test('processes payment', async () => {
const order = createOrder({ total: 100 })
const payment = createPayment({ orderId: order.id, amount: 100 })
// Calls the function but doesn't verify anything
await paymentService.process(payment)
// Test passes even if process() does nothing
})
test('user registration flow', async () => {
const userData = { email: 'test@example.com', password: 'secret123' }
const user = await userService.register(userData)
await emailService.sendWelcome(user.id)
await analyticsService.trackSignup(user.id)
// Multiple operations, zero verification
// Could silently fail and test still passes
})Correct (explicit assertions):
test('processes payment and updates order status', async () => {
const order = createOrder({ total: 100, status: 'pending' })
const payment = createPayment({ orderId: order.id, amount: 100 })
await paymentService.process(payment)
const updatedOrder = await orderService.getById(order.id)
expect(updatedOrder.status).toBe('paid')
expect(updatedOrder.paidAt).toBeDefined()
})
test('registration creates user and sends welcome email', async () => {
const mockEmailService = { sendWelcome: jest.fn() }
const userService = new UserService({ emailService: mockEmailService })
const user = await userService.register({
email: 'test@example.com',
password: 'secret123'
})
expect(user.id).toBeDefined()
expect(user.email).toBe('test@example.com')
expect(mockEmailService.sendWelcome).toHaveBeenCalledWith(user.id)
})Common assertion-free antipatterns:
Reference: 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