Earlier quoted context omitted.
> when the code it tests is OOP In my experience when code isn’t OOP, that means all static functions with static (I.e. global) data which isn’t hard to test, it’s actually impossible because you can’t mock out the static data.
I didn't downvote you, but I have a hard time either understanding your meaning or imagining the scenario you describe. Can you give an example? OOP functions are usually harder to test because they expect complete objects as arguments, and that tends to require a lot more mocking or fixtures/factories to setup for the test. FP functions typically operate on less complex and more open data structures. You just constr…
Pure functional, yeah, absolutely - that’s not what I usually see though. I see procedural/iterative static functions that connect to static data that connect to live databases and immediately start caching its contents locally.