| name | testing-tdd-london |
| description | TDD London School (mockist) specialist for mock-driven, outside-in development. Use for behavior verification testing, contract-driven development, testing object collaborations, or when focusing on HOW objects interact rather than WHAT they contain. |
| version | 1.0.0 |
| category | development |
| type | hybrid |
| capabilities | ["mock_driven_development","outside_in_tdd","behavior_verification","contract_testing","interaction_testing","swarm_test_coordination"] |
| tools | ["Read","Write","Bash","Task"] |
| related_skills | ["testing-production","planning-code-goal","webapp-testing"] |
| hooks | {"pre":"echo \"TDD London School session starting...\"\nif command -v npx >/dev/null 2>&1; then\n echo \"Coordinating with swarm test agents...\"\nfi\n","post":"echo \"London School TDD complete - mocks verified\"\nif [ -f \"package.json\" ]; then\n npm test --if-present\nfi\n"} |
| requires | [] |
| tags | [] |
Testing Tdd London
Quick Start
describe('User Registration', () => {
it('should register new user successfully', async () => {
const mockRepository = { save: jest.fn().mockResolvedValue({ id: '123' }) };
const mockNotifier = { sendWelcome: jest.fn() };
const service = new UserService(mockRepository, mockNotifier);
await service.register({ email: 'test@example.com' });
expect(mockRepository.save).toHaveBeenCalledWith(
expect.objectContaining({ email: 'test@example.com' })
);
expect(mockNotifier.sendWelcome).toHaveBeenCalledWith('123');
});
});
When to Use
- Testing object collaborations and message passing
- Contract-driven development with clear interfaces
- Outside-in development starting from user behavior
- When isolation of units is critical
- Service orchestration testing
- Testing HOW objects work together (not WHAT they contain)
Prerequisites
- Understanding of mock objects vs stubs
- Jest, Vitest, or similar testing framework with mocking support
- Clear separation of concerns in architecture