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
Test names should describe the scenario and expected outcome so clearly that you understand what broke without reading the test code.
Incorrect (vague or technical names):
test('test1', () => { /* ... */ })
test('calculator', () => { /* ... */ })
test('divide', () => { /* ... */ })
test('divideByZeroTest', () => { /* ... */ })
test('should work correctly', () => { /* ... */ })Correct (scenario and outcome in name):
// Pattern: [unit]_[scenario]_[expectedBehavior]
test('divide_positiveNumbers_returnsQuotient', () => {
expect(divide(10, 2)).toBe(5)
})
test('divide_byZero_throwsDivisionError', () => {
expect(() => divide(10, 0)).toThrow(DivisionError)
})
// Pattern: "should [outcome] when [condition]"
test('should return empty array when no users match filter', () => {
const result = filterUsers(users, { role: 'nonexistent' })
expect(result).toEqual([])
})
// Pattern: "it [does something]"
describe('ShoppingCart', () => {
describe('addItem', () => {
it('increases total by item price', () => { /* ... */ })
it('increments item count', () => { /* ... */ })
it('throws when item is out of stock', () => { /* ... */ })
})
})Good test names answer:
Benefits:
Reference: Unit Test Naming Conventions - TheCodeBuzz
Install with Tessl CLI
npx tessl i pantheon-ai/test-driven-developmentevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
references