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
Use the most specific assertion available for the check. Specific assertions provide better failure messages and document expected behavior more clearly.
Incorrect (generic assertions):
test('filters active users', () => {
const users = [
{ id: '1', active: true },
{ id: '2', active: false }
]
const result = filterActiveUsers(users)
// Generic - failure message: "expected true to be false"
expect(result.length === 1).toBe(true)
expect(result[0].id === '1').toBe(true)
})
test('user has expected properties', () => {
const user = getUser('123')
// Generic - unhelpful failure message
expect(user !== null).toBe(true)
expect(typeof user.email === 'string').toBe(true)
})Correct (specific assertions):
test('filters active users', () => {
const users = [
{ id: '1', active: true },
{ id: '2', active: false }
]
const result = filterActiveUsers(users)
// Specific - failure: "expected [array] to have length 1, got 0"
expect(result).toHaveLength(1)
// Specific - failure: "expected {id: '2'} to match {id: '1'}"
expect(result[0]).toMatchObject({ id: '1' })
})
test('user has expected properties', () => {
const user = getUser('123')
// Specific - failure: "expected null not to be null"
expect(user).not.toBeNull()
// Specific - failure: "expected 123 to be a string"
expect(user.email).toEqual(expect.any(String))
})Preferred matchers:
toHaveLength() over .length === ntoContain() over includes() === truetoMatchObject() over checking each propertytoThrow() over try/catch with booleantoBeGreaterThan() over > comparison === trueReference: Jest Expect API
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