UNPKG

@wizard9/json-patch-apply

Version:

A library for describing, calculating, and applying patches to Javascript Objects.

14 lines 522 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const chai_1 = require("chai"); const diff_1 = require("../src/diff"); describe("diff", () => { let diff = new diff_1.PatchDiff(); it("diffs primitive with undefined", () => { let source = "abc"; let target = undefined; let found = diff.diff(source, target); chai_1.expect(JSON.stringify(found)).eql("[{\"op\":\"remove\",\"path\":\"\",\"old\":\"abc\"}]"); }); }); //# sourceMappingURL=diff.spec.js.map