()
| 3627 | |
| 3628 | #[test] |
| 3629 | fn insert_array_element_trailing_commas() { |
| 3630 | let cst = build_cst( |
| 3631 | r#"{ |
| 3632 | "prop": [ |
| 3633 | 1, |
| 3634 | 2, |
| 3635 | ] |
| 3636 | }"#, |
| 3637 | ); |
| 3638 | cst |
| 3639 | .object_value_or_create() |
| 3640 | .unwrap() |
| 3641 | .array_value("prop") |
| 3642 | .unwrap() |
| 3643 | .append(json!(3)); |
| 3644 | assert_eq!( |
| 3645 | cst.to_string(), |
| 3646 | r#"{ |
| 3647 | "prop": [ |
| 3648 | 1, |
| 3649 | 2, |
| 3650 | 3, |
| 3651 | ] |
| 3652 | }"# |
| 3653 | ); |
| 3654 | } |
| 3655 | |
| 3656 | #[test] |
| 3657 | fn remove_comment() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…