2 ms·
Tests are a trade - you spend some dev time writing and maintaining tests, and in return you might save some time and money down the line, if the test prevents
by yen223 6y ago
Tests are a trade - you spend some dev time writing and maintaining tests, and in return you might save some time and money down the line, if the test prevents bugs from doing damage. Tests aren't always good. There are tests that are so difficult to write and maintain, that they basically never repay their dev cost.
All that is to say, I like snapshot tests. Snapshot tests can be created and updated automatically, basically making their dev cost close to 0. They are so cheap that they don't actually have to catch a lot of bugs for them to be a net positive.