mirror of
https://github.com/Noratrieb/jsonformat.git
synced 2026-01-14 14:15:03 +01:00
add new test
This commit is contained in:
parent
8e45eda342
commit
427f285f24
1 changed files with 15 additions and 0 deletions
15
src/lib.rs
15
src/lib.rs
|
|
@ -165,4 +165,19 @@ mod test {
|
|||
|
||||
assert_eq!(expected, format_json(json, None));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn already_formatted() {
|
||||
let expected = "[
|
||||
{
|
||||
\"a\": 0
|
||||
},
|
||||
{},
|
||||
{
|
||||
\"a\": null
|
||||
}
|
||||
]";
|
||||
|
||||
assert_eq!(expected, format_json(expected, None));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue