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

Function insert_only_no_old_value

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

Source from the content-addressed store, hash-verified

450
451 #[test]
452 fn insert_only_no_old_value() {
453 let old = json!(null);
454 let new = json!({"title": "New Doc"});
455 let diffs = compute_field_diffs(&old, &new);
456 // Type mismatch (null vs object) — whole thing is a modify at root.
457 assert_eq!(diffs.len(), 0); // Root-level diff with empty prefix is skipped.
458 }
459
460 #[test]
461 fn field_diff_serialization() {

Callers

nothing calls this directly

Calls 1

compute_field_diffsFunction · 0.85

Tested by

no test coverage detected