MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / array_element_modified

Function array_element_modified

nodedb/src/event/field_diff.rs:393–399  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

391
392 #[test]
393 fn array_element_modified() {
394 let old = json!({"blocks": [{"type": "h1", "text": "Old"}, {"type": "p", "text": "Same"}]});
395 let new = json!({"blocks": [{"type": "h1", "text": "New"}, {"type": "p", "text": "Same"}]});
396 let diffs = compute_field_diffs(&old, &new);
397 assert_eq!(diffs.len(), 1);
398 assert_eq!(diffs[0].field, "blocks[0].text");
399 }
400
401 #[test]
402 fn array_element_inserted() {

Callers

nothing calls this directly

Calls 1

compute_field_diffsFunction · 0.85

Tested by

no test coverage detected