mocking is required when our supposed atomic units of composition are not really atomic, and our decomposition strategy has failed to decompose the larger problem into smaller, independent problems.
Mocking is a Code Smell
Eric Elliott

and what you have to say when we mock to simulate a context/environment such as a window browser that has many attributes functions that we rely on (in runtime) but do not exist during test-time?