|
|
|
|
|
by Hasu
532 days ago
|
|
The problem with snapshot tests is that they tend to fail when something is changed. One property of good tests is that they only fail when something is broken. Snapshot tests aren't really automated tests, because you have to manually check the outputs to see if failures are genuine. It's a reminder to do manual checking but it's still not an automated process. > The best testing technique in the world can't save us from developer error. Sure, but using a testing technique that increases developer error is unwise, and snapshot testing has done that every time I've seen it used, so I don't use it anymore. |
|
Then fix the test so that it fails only when something breaks? Do people not fix flaky, overly broad, or incorrect unit tests? How is a snapshot test any different?