hrsh7th / msw-snapshot

Transparently create an API cache for testing.
6 stars 2 forks source link

fix protocol #7

Open Maxim-Mazurok opened 9 months ago

Maxim-Mazurok commented 9 months ago

Fixes #6

Hopefully this makes sense, cheers!

Maxim-Mazurok commented 9 months ago

Also in my project I did this: updateSnapshots: process.env["UPDATE_MSW_SNAPSHOT"] === "1" || "missing", to me that's the desired behaviour. This makes more sense to me, same as snapshots in jest/vitest, if there's no snapshot - test will either create the snapshot (in dev mode) or fail (in CI mode). Under no circumstances test will just pass. But I guess it is different because we don't have assertions for snapshot in the first place... So just sharing my thoughts, I can kinda see that some might want it to silently fetch from the network.