MCPcopy Create free account
hub / github.com/dprint/jsonc-parser / missing_comma_between_properties

Function missing_comma_between_properties

src/parse_to_ast.rs:701–721  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

699
700 #[test]
701 fn missing_comma_between_properties() {
702 let text = r#"{
703 "name": "alice"
704 "age": 25
705}"#;
706 let result = parse_to_ast(text, &Default::default(), &Default::default()).unwrap();
707 assert_eq!(
708 result
709 .value
710 .unwrap()
711 .as_object()
712 .unwrap()
713 .get_number("age")
714 .unwrap()
715 .value,
716 "25"
717 );
718
719 // but is strict when strict
720 assert_has_strict_error(text, "Expected comma on line 2 column 18");
721 }
722
723 #[test]
724 fn missing_comma_with_comment_between_properties() {

Callers

nothing calls this directly

Calls 2

parse_to_astFunction · 0.85
assert_has_strict_errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…