Apply London (mock-based) and Chicago (state-based) TDD schools. Use when practicing test-driven development or choosing testing style for your context.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Apply London (mock-based) and Chicago (state-based) TDD schools. Use when practicing test-driven development or choosing testing style for your context.
Philosophy: Test observable behavior through public API. Keep tests close to consumer usage.
// State verification - test final outcomedescribe('Order', () => {
it('calculates total with tax', () => {
const order = newOrder();
order.addItem(newProduct('Widget', 10.00), 2);
order.addItem(newProduct('Gadget', 15.00), 1);
expect(order.totalWithTax(0.10)).toBe(38.50);
});
});
When Chicago Shines:
Domain logic with clear state
Algorithms and calculations
Value objects (Money, Email)
Simple collaborations
Learning new domain
London School (Mock-Based)
Philosophy: Test each unit in isolation. Focus on how objects collaborate.
Chicago: Test state, use real objects, refactor freely
London: Test interactions, mock dependencies, design interfaces first
Both: Write the test first, make it pass, refactor
Neither is "right." Choose based on context. Mix as needed. Goal: well-designed, tested code.
With Agents: Agents excel at generating tests, validating green phase, and suggesting refactorings. Use agents to maintain TDD discipline while humans focus on design decisions.