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
When testing error conditions, verify both the error type and message. Catching any error isn't enough - the right error must be thrown.
Incorrect (any error passes):
test('throws on invalid email', () => {
// Passes if ANY error is thrown, even unrelated ones
expect(() => createUser({ email: 'invalid' })).toThrow()
})
test('throws on missing required field', async () => {
// Catches network errors, type errors, anything
await expect(saveUser({})).rejects.toBeDefined()
})Correct (specific error assertions):
test('throws ValidationError for invalid email', () => {
expect(() => createUser({ email: 'invalid' }))
.toThrow(ValidationError)
})
test('error message indicates invalid email format', () => {
expect(() => createUser({ email: 'invalid' }))
.toThrow('Invalid email format')
})
test('throws with specific error details', () => {
expect(() => createUser({ email: 'invalid' }))
.toThrow(expect.objectContaining({
code: 'VALIDATION_ERROR',
field: 'email'
}))
})
test('async operation throws NotFoundError', async () => {
await expect(getUser('nonexistent'))
.rejects.toThrow(NotFoundError)
})
test('error includes resource identifier', async () => {
await expect(getUser('user-999'))
.rejects.toThrow(/user-999/)
})What to assert:
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-developmentevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references