You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current test suite relies on cargo-insta to do snapshot testing but it also has serialized versions of several structs as &'static strs inside the codebase. But, nothing guarantees that the snapshot and the embedded strings actually match each other, doing visual inspection is not practical when the text is several hundred lines long. Even if they were the same, there is duplicated information due to this.
I consider that the embedded strings should be removed and only keep the snapshot files. I'm not sure if cargo-insta provides a way to read the snapshot files so they can be used as deserialization inputs so that's a thing to consider.
Additionally extra tests could be added to verify that serializing -> deserializing and deserializing -> serializing are consistent.
The text was updated successfully, but these errors were encountered:
The current test suite relies on
cargo-insta
to do snapshot testing but it also has serialized versions of several structs as&'static str
s inside the codebase. But, nothing guarantees that the snapshot and the embedded strings actually match each other, doing visual inspection is not practical when the text is several hundred lines long. Even if they were the same, there is duplicated information due to this.I consider that the embedded strings should be removed and only keep the snapshot files. I'm not sure if
cargo-insta
provides a way to read the snapshot files so they can be used as deserialization inputs so that's a thing to consider.Additionally extra tests could be added to verify that serializing -> deserializing and deserializing -> serializing are consistent.
The text was updated successfully, but these errors were encountered: