Snapshot Testing in Swift
An example of a snapshot failure in Xcode. A snapshot test is a test case that uses reference data—typically a file on disk—to assert the correctness of some code. 1 Where unit tests make fine-grained checks against explicit expectations (really, whatever the engineer anticipates should be right or may go wrong), snapshot tests can zoom out and cover far more surface area and potential…