diff options
Diffstat (limited to 'toolkit/jetpack/diffpatcher/test/index.js')
-rw-r--r-- | toolkit/jetpack/diffpatcher/test/index.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/toolkit/jetpack/diffpatcher/test/index.js b/toolkit/jetpack/diffpatcher/test/index.js new file mode 100644 index 000000000..c06407e7c --- /dev/null +++ b/toolkit/jetpack/diffpatcher/test/index.js @@ -0,0 +1,14 @@ +"use strict"; + +var diff = require("../diff") +var patch = require("../patch") + +exports["test diff"] = require("./diff") +exports["test patch"] = require("./patch") + +exports["test patch(a, diff(a, b)) => b"] = function(assert) { + var a = { a: { b: 1 }, c: { d: 2 } } + var b = { a: { e: 3 }, c: { d: 4 } } + + assert.deepEqual(patch(a, diff(a, b)), b, "patch(a, diff(a, b)) => b") +} |