Pure functions can’t directly mutate global variables, the arguments passed into them, the network, the disk, or the screen. All they can do is return a value.
Mocking is a Code Smell
Eric Elliott
7.8K57

Pure functions are really idempotent black boxes, like a mini-API. That’s really its power. Mocking is an “expense” with little or no direct benefit to software end users; so it should be minimized whenever possible. Can lead to “busy works” that contributed to little betterment of the software under test.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.