2 ms·
With modern compilers and debuggers, a good set of integration tests is all you need. You can refactor large parts of the code base and if the integration test
by snarfy 10y ago
With modern compilers and debuggers, a good set of integration tests is all you need. You can refactor large parts of the code base and if the integration tests break, thanks to debuggers etc you can easily identify the breaking changes within minutes. There is no need for 100% code coverage in unit tests to catch these same changes. If you do need it your tooling is lacking.
Writing code is expensive. If you have more test code than real code it means you value correctness over features. If I can skip unit tests entirely and have a 95% functioning system, I'm not sure that 5% is worth an extra 500% or so lines of code needed in unit tests for 100% code coverage.
Unit tests might seem more important in dynamic languages like JavaScript, but that really just points to poor tooling.