Anti-Pattern 4: Incomplete Mocks
**The violation:** ```typescript // ❌ BAD: Partial mock - only fields you think you need const mockResponse = { status: 'success', data: { userId: '123', name: 'Alice' } // Missing: metadata that downstream code uses }; // Later: breaks when code accesses response.metadata.requestId ``` **Why this is wrong:** - **Partial mocks hide structural assumptions** - You only mocked fields you know about - **Downstream code may depend on fields you didn't include** - Silent failures - **Tests pass but integration fails** - Mock incomplete, real API complete - **False confidence** - Test proves nothing about real behavior **The Iron Rule:** Mock the COMPLETE data structure as it exists in reality, not just fields your immediate test uses. **The fix:** ```typescript // ✅ GOOD: Mirror real API completeness const mockResponse = { status: 'success', data: { userId: '123', name: 'Alice' }, metadata: { requestId: 'req-789', timestamp: 1234567890 } // All fields real API returns }; ```