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
Include only the data necessary for the specific test. Excessive setup obscures the test's purpose and slows execution.
Incorrect (excessive setup):
test('validates email format', () => {
// Full user object when only email matters
const user = {
id: '123',
firstName: 'John',
lastName: 'Doe',
email: 'invalid-email',
dateOfBirth: new Date('1990-01-01'),
address: {
street: '123 Main St',
city: 'Springfield',
state: 'IL',
zipCode: '12345'
},
preferences: {
newsletter: true,
notifications: { email: true, sms: false }
},
createdAt: new Date(),
updatedAt: new Date()
}
const errors = validateUser(user)
expect(errors).toContain('Invalid email format')
})Correct (minimal setup):
test('validates email format', () => {
// Only email is relevant to this test
const user = createUser({ email: 'invalid-email' })
const errors = validateUser(user)
expect(errors).toContain('Invalid email format')
})
// Or even simpler if testing just the email validator
test('rejects email without @ symbol', () => {
const result = isValidEmail('invalidemail')
expect(result).toBe(false)
})Guidelines:
Reference: Rails Testing Antipatterns - Semaphore
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-developmentevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references