4 ms·
Unit testing is definitely influenced by language culture but there's also the issue of how easy it is to do. JS doesn't have the unit testing uptake that Java
by michaelfeathers 13y ago
Unit testing is definitely influenced by language culture but there's also the issue of how easy it is to do.
JS doesn't have the unit testing uptake that Java/C#/Ruby/Python have, and I think that largely it is because JS is often used in the front-end and people aren't used to having any sort of an abstraction layer.
The issue with C is that it is hard to mock. You can use the preprocessor, the linker, or function pointers. The latter is the best option but your code ends up looking quasi-OO with structs of function pointers. It's a style people are used to in some OS programming but it does freak some people out.