Skip to content

Commit 2a31c1e

Browse files
committed
Use insta snapshot comparisons for full-SDL assertions
1 parent 3c350c0 commit 2a31c1e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

apollo-federation/src/schema/schema_upgrader.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ mod tests {
518518
&r#"Removed @provides directive on field "Random.x" as it is of non-composite type "Int": while not rejected by federation 0.x, such @provide is nonsensical and was ignored"#.to_string()
519519
));
520520

521-
assert_eq!(
521+
insta::assert_snapshot!(
522522
s1.schema().schema().to_string(),
523523
r#"
524524
schema
@@ -596,7 +596,7 @@ mod tests {
596596
]
597597
);
598598

599-
assert_eq!(
599+
insta::assert_snapshot!(
600600
s.schema().schema().to_string(),
601601
r#"
602602
schema
@@ -831,7 +831,7 @@ mod tests {
831831
// router that supports the build pipeline they're upgrading to, but that
832832
// mechanism isn't in place yet.
833833
// - Trevor
834-
assert_eq!(
834+
insta::assert_snapshot!(
835835
subgraph.schema().schema().to_string(),
836836
r#"
837837
schema
@@ -842,7 +842,6 @@ mod tests {
842842
}
843843
"#
844844
);
845-
// TODO: Check if SDL assertions are better done with assert_snapshot
846845
}
847846

848847
#[ignore = "not yet implemented"]

0 commit comments

Comments
 (0)