index.js 380 B

1234567891011121314
  1. "use strict";
  2. var diff = require("../diff")
  3. var patch = require("../patch")
  4. exports["test diff"] = require("./diff")
  5. exports["test patch"] = require("./patch")
  6. exports["test patch(a, diff(a, b)) => b"] = function(assert) {
  7. var a = { a: { b: 1 }, c: { d: 2 } }
  8. var b = { a: { e: 3 }, c: { d: 4 } }
  9. assert.deepEqual(patch(a, diff(a, b)), b, "patch(a, diff(a, b)) => b")
  10. }