top | item 44325237

(no title)

laerus | 8 months ago

Snapshots diff current with previous output and I only have to accept or reject the diff. I don't have to write the expected response myself. Snapshots can also stub out parts of the response that are not determistic.

discuss

order

adelineJoOs|8 months ago

> Snapshots can also stub out parts of the response that are not determistic.

TIL! The way I knew to do it was to have a mock implementation that behaved like the real thing, expect for data/time/uuids/..., where there was just a placeholder. Snapshot tests being able to "mask" those non-deterministic parts sounds cool!