summaryrefslogtreecommitdiffstats
path: root/toolkit/jetpack/diffpatcher/test/index.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-09 06:46:43 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-09 06:46:43 -0500
commitac46df8daea09899ce30dc8fd70986e258c746bf (patch)
tree2750d3125fc253fd5b0671e4bd268eff1fd97296 /toolkit/jetpack/diffpatcher/test/index.js
parent8cecf8d5208f3945b35f879bba3015bb1a11bec6 (diff)
downloadUXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar
UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar.gz
UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar.lz
UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.tar.xz
UXP-ac46df8daea09899ce30dc8fd70986e258c746bf.zip
Move Add-on SDK source to toolkit/jetpack
Diffstat (limited to 'toolkit/jetpack/diffpatcher/test/index.js')
-rw-r--r--toolkit/jetpack/diffpatcher/test/index.js14
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")
+}