Agent skill
testing-tdd-london
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.
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/development/testing/testing-tdd-london
SKILL.md
Testing Tdd London
Quick Start
// 1. Start with acceptance test (outside)
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' });
// 2. Verify behavior (interactions)
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
- Dependency injection pattern in codebase
References
Version History
- 1.0.0 (2026-01-02): Initial release - converted from tdd-london-swarm agent
Sub-Skills
- Configuration
- Example 1: Service Orchestration Test (+2)
- Mock Management (+2)
Sub-Skills
- Execution Checklist
- Error Handling
Sub-Skills
- London vs Chicago School (+2)
- 1. Outside-In Development (+2)
- Metrics & Success Criteria
- MCP Tools (+2)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?