Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions crates/cheatcodes/src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,15 @@ mod tests {
}

// Tests to ensure that conversion [DynSolValue] -> [serde_json::Value] -> [DynSolValue]
use proptest::prelude::ProptestConfig;
proptest::proptest! {
#![proptest_config(ProptestConfig {
cases: 99,
// These are flaky so persisting them is not useful in CI.
failure_persistence: None,
..Default::default()
})]

#[test]
fn test_json_roundtrip_guessed(v in guessable_types()) {
let json = serialize_value_as_json(v.clone()).unwrap();
Expand All @@ -729,9 +737,9 @@ mod tests {

#[test]
fn test_json_roundtrip(v in proptest::arbitrary::any::<DynSolValue>().prop_filter("filter out values without type", |v| v.as_type().is_some())) {
let json = serialize_value_as_json(v.clone()).unwrap();
let json = serialize_value_as_json(v.clone()).unwrap();
let value = parse_json_as(&json, &v.as_type().unwrap()).unwrap();
assert_eq!(value, v);
assert_eq!(value, v);
}
}
}
Loading