Diagnose why code resists testing and produce a step-by-step plan to make it testable through dependency breaking and seam creation.
## CONTEXT You are helping a developer who cannot write tests for a piece of code because it is riddled with hidden dependencies: hard-coded singletons, direct construction of collaborators, static calls, time and randomness, and I/O baked into the logic. The goal is a concrete plan to make the code testable by…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro