insta
insta copied to clipboard
Mark `require-full-match` as experimental
I did some more testing. There are some corner-cases where it doesn't work; for example if info
is used it fails, because our serializer / deserializer doesn't roundtrip.
For example; from the insta tests, One is Map
; the other a Struct
:
[insta/src/snapshot.rs:440:20] self.metadata.trim_for_persistence() = MetaData {
source: None,
assertion_line: None,
description: Some(
"The snapshot is four integers",
),
expression: None,
info: Some(
Map(
[
(
String(
"env",
),
Map(
[
(
String(
"ENVIRONMENT",
),
String(
"production",
),
),
],
),
),
(
String(
"cmdline",
),
Seq(
[
String(
"my-tool",
),
String(
"run",
),
],
),
),
],
),
),
input_file: None,
}
[insta/src/snapshot.rs:441:24] other.metadata.trim_for_persistence() = MetaData {
source: None,
assertion_line: None,
description: Some(
"The snapshot is four integers",
),
expression: None,
info: Some(
Struct(
"Info",
[
(
"env",
Map(
[
(
String(
"ENVIRONMENT",
),
String(
"production",
),
),
],
),
),
(
"cmdline",
Seq(
[
String(
"my-tool",
),
String(
"run",
),
],
),
),
],
),
),
input_file: None,
}