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
Happy path tests alone miss most bugs. Explicitly test boundaries, empty states, error conditions, and unusual inputs where bugs typically hide.
Incorrect (happy path only):
test('paginates results', () => {
const items = createItems(100)
const result = paginate(items, { page: 1, pageSize: 10 })
expect(result.items).toHaveLength(10)
expect(result.totalPages).toBe(10)
})
// Works for normal case, crashes in production on edge casesCorrect (comprehensive edge case coverage):
describe('paginate', () => {
// Happy path
it('returns requested page of items', () => {
const items = createItems(100)
const result = paginate(items, { page: 2, pageSize: 10 })
expect(result.items).toHaveLength(10)
expect(result.currentPage).toBe(2)
})
// Empty state
it('returns empty array when no items exist', () => {
const result = paginate([], { page: 1, pageSize: 10 })
expect(result.items).toEqual([])
expect(result.totalPages).toBe(0)
})
// Boundary: last page partial
it('returns partial page when items dont fill last page', () => {
const items = createItems(25)
const result = paginate(items, { page: 3, pageSize: 10 })
expect(result.items).toHaveLength(5)
})
// Boundary: page beyond range
it('returns empty array when page exceeds total pages', () => {
const items = createItems(10)
const result = paginate(items, { page: 5, pageSize: 10 })
expect(result.items).toEqual([])
})
// Invalid input
it('throws when page is zero or negative', () => {
expect(() => paginate([], { page: 0, pageSize: 10 })).toThrow()
expect(() => paginate([], { page: -1, pageSize: 10 })).toThrow()
})
// Boundary: single item
it('handles single item correctly', () => {
const items = createItems(1)
const result = paginate(items, { page: 1, pageSize: 10 })
expect(result.items).toHaveLength(1)
expect(result.totalPages).toBe(1)
})
})Edge case checklist:
Reference: Test Driven Development by Kent Beck
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