MarvinJWendt/testza

Make string snapshots be saved as-is with a spew-like header.

Vilsol opened this issue · 2 comments

Currently all snapshots get passed through a spew.Sdump which then get saved to a file. This ensures that even if the object type/name changes but content doesn't, snapshot would still fail.

An alternative option could be that upon taking a snapshot, the type is tested, and if it casts to a string, it could be stored as-is into the snapshot file, except with a header that would be similar in structure to the current spew.Sdump to ensure the type-check is still in place.

No longer breaking, as discussed in Discord.

No longer relevant since #97