Skip to content

Commit 8481cfb

Browse files
authored
test(cheatcodes): strings with {} are not roundtrippable (#11391)
1 parent 3476855 commit 8481cfb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

crates/cheatcodes/src/json.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,15 @@ mod tests {
716716
}
717717

718718
// Tests to ensure that conversion [DynSolValue] -> [serde_json::Value] -> [DynSolValue]
719+
use proptest::prelude::ProptestConfig;
719720
proptest::proptest! {
721+
#![proptest_config(ProptestConfig {
722+
cases: 99,
723+
// These are flaky so persisting them is not useful in CI.
724+
failure_persistence: None,
725+
..Default::default()
726+
})]
727+
720728
#[test]
721729
fn test_json_roundtrip_guessed(v in guessable_types()) {
722730
let json = serialize_value_as_json(v.clone()).unwrap();
@@ -729,9 +737,9 @@ mod tests {
729737

730738
#[test]
731739
fn test_json_roundtrip(v in proptest::arbitrary::any::<DynSolValue>().prop_filter("filter out values without type", |v| v.as_type().is_some())) {
732-
let json = serialize_value_as_json(v.clone()).unwrap();
740+
let json = serialize_value_as_json(v.clone()).unwrap();
733741
let value = parse_json_as(&json, &v.as_type().unwrap()).unwrap();
734-
assert_eq!(value, v);
742+
assert_eq!(value, v);
735743
}
736744
}
737745
}

0 commit comments

Comments
 (0)