Re:Meta Is Transferring Jest to the OpenJS Foundation
by matsemann on Wednesday May 11, 2022 @03:34PM
(#31344689)
Do you feel the snapshot tests are useful? I've mostly had bad experiences with them (mostly noise), so interested in hearing what makes them work for you/others.
[ Parent
| on HN ]
Re:Meta Is Transferring Jest to the OpenJS Foundation
by eyelidlessness on Wednesday May 11, 2022 @09:48PM
(#31348270)
I (weirdly) got sold on snapshot tests while developing a tree-sitter grammar. They don’t make it super obvious (and most snapshotting test solutions don’t) that you can “update all”, but the workflow makes more sense to me now that I’ve even generated my test cases from a more intentional suite. The goal is for it to be noise! It’s entirely a regression test, and it should alert you if you changed something without knowing you did. But it’s only valuable if you snapshot test the things you expect to be stable, write specific tests for the changes you intend to make, and compare between them.
Re:Meta Is Transferring Jest to the OpenJS Foundation
by _fat_santa on Wednesday May 11, 2022 @09:16PM
(#31348047)
Their not that terribly useful. We have already been talking about replacing them with proper unit tests. One thing they are very useful for is being a cheap way of showing non-technical leadership that you have "100% test coverage".