CtrlK
BlogDocsLog inGet started
Tessl Logo

pantheon-ai/test-driven-development

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?

Evaluation86%

1.05x

Agent success when using this tile

Validation for skill structure

Overview
Skills
Evals
Files

strat-coverage-targets.mdreferences/

title:
Set Meaningful Coverage Targets
impact:
LOW
impactDescription:
2-3× better ROI on testing effort
tags:
strat, coverage, metrics, targets

Set Meaningful Coverage Targets

Aim for high coverage on critical paths, not 100% everywhere. Coverage is a guide, not a goal - focus on meaningful tests over hitting numbers.

Incorrect (coverage as goal):

// Chasing 100% coverage
test('getter returns value', () => {
  const user = new User({ name: 'Alice' })
  expect(user.getName()).toBe('Alice')  // Tests trivial getter
})

test('setter sets value', () => {
  const user = new User({ name: 'Alice' })
  user.setName('Bob')
  expect(user.getName()).toBe('Bob')  // Tests trivial setter
})

test('toString returns string', () => {
  const user = new User({ name: 'Alice' })
  expect(typeof user.toString()).toBe('string')  // Meaningless test
})

// Result: 100% coverage, but critical business logic untested
// Tests don't prevent bugs, just satisfy metric

Correct (strategic coverage):

// High coverage on critical business logic
describe('PaymentProcessor', () => {
  it('calculates tax correctly for each region', () => { /* ... */ })
  it('applies discounts in correct order', () => { /* ... */ })
  it('handles currency conversion', () => { /* ... */ })
  it('prevents double-charging', () => { /* ... */ })
  it('validates card details', () => { /* ... */ })
})
// 95% coverage on critical module

// Lower coverage acceptable on utilities
describe('StringUtils', () => {
  it('capitalizes first letter', () => { /* ... */ })
  // Don't test every edge case of simple utility
})
// 60% coverage acceptable on simple utilities

Coverage strategy:

Module TypeTargetRationale
Business logic90%+Critical, complex
API handlers80%+User-facing
Utilities60%+Simple, stable
Generated code0%Tested elsewhere

Better metrics:

  • Mutation score (test effectiveness)
  • Bug escape rate (tests vs. production bugs)
  • Mean time to detect (how quickly tests catch bugs)

Reference: Code Coverage Best Practices - Google Testing Blog

Install with Tessl CLI

npx tessl i pantheon-ai/test-driven-development

SKILL.md

tile.json