summaryrefslogtreecommitdiffstats
path: root/addon-sdk/source/lib/diffpatcher/test/index.js
blob: c06407e7c5bbcb93a2b63816b9e12e0d91bb06be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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")
}