3 ms·
> Especially in languages like javascript you can do a lot with mocking frameworks and dependency orchestration hacking to make bad code work. This is precisel
by imbnwa 3y ago
> Especially in languages like javascript you can do a lot with mocking frameworks and dependency orchestration hacking to make bad code work.
This is precisely why I do everything I can to block usage of Jest, and more generally, another reason we need to sunset CommonJS. People just abuse this stuff. There is a fine line in our craft where your tools need to hinder convenience, hence why we have much discussion around strongly-typed vs weakly-typed, why TypeScript has gained so much traction, etc.
Vast majority of 'business' stakeholders are going to exert downward pressure for the most convenient option, but the consequence isn't merely this or that quality of code design, but that subsequent generations of developer _have no chance_ of developing actual system design skills, evaluation of patterns, etc. And why should they? Use Jest to mock all the things, slap the 100% code coverage label on it, and start moving the next ticket to 'Done'.