diff --git a/src-tauri/yaak_templates/src/format.rs b/src-tauri/yaak_templates/src/format.rs index 6e665164..a7fab304 100644 --- a/src-tauri/yaak_templates/src/format.rs +++ b/src-tauri/yaak_templates/src/format.rs @@ -151,6 +151,19 @@ mod test { ); } + #[test] + fn test_escaped() { + assert_eq!( + format_json(r#"{"foo":"Hi \"world!\""}"#, " "), + r#" +{ + "foo": "Hi \"world!\"" +} +"# + .trim() + ); + } + #[test] fn test_simple_array() { assert_eq!( @@ -219,7 +232,7 @@ mod test { .trim() ); } - + #[test] fn test_graphql_response() { assert_eq!(