The following test appears to be expecting no operation according the prose description but the code is expecting and seeing a replace operation. Isn't the description's the correct behavior?
JSC.test(
'no replace in equal nested structure',
function(veredict, obj, obj2) {
var map1 = fromJS(obj);
var map2 = fromJS(obj).set('a', obj2.a);
var result = diff(map1, map2);
var expected = fromJS([{op: 'replace', path: ['a'], value: obj2.a}]);
return veredict(is(result, expected));
},
[
JSC.object({
a: JSC.integer(),
b: JSC.object({
c: JSC.integer()
})
}),
JSC.object({
a: JSC.integer()
})
]
);
The following test appears to be expecting no operation according the prose description but the code is expecting and seeing a
replace
operation. Isn't the description's the correct behavior?