diff --git a/test/jiff-test.js b/test/jiff-test.js index 14fd84a..ca2b59c 100644 --- a/test/jiff-test.js +++ b/test/jiff-test.js @@ -120,6 +120,15 @@ buster.testCase('jiff', { } } } + }, + 'should generate replace': function() { + var a = [1, 2]; + var b = [3, 2]; + + var patch = jiff.diff(a, b, { invertible: false }); + assert.equals(patch.length, 1); + assert.equals(patch[0].op, 'replace'); + assert.equals(b, jiff.patch(patch, a)); } },