UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

57 lines (56 loc) 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const testCases = [ { comment: 'At root, should find object', doc: { hello: 'world', }, patch: [ { op: 'in', path: '', value: [ 1, { hello: 'world', }, ], }, ], expected: { hello: 'world', }, }, { comment: 'At root, returns error when object list not match', doc: { hello: 'world', }, patch: [ { op: 'in', path: '', value: [1], }, ], error: 'TEST', }, { comment: 'At root, returns error when object list not match - 2', doc: [ { hello: 'world', }, ], patch: [ { op: 'in', path: '', value: [1], }, ], error: 'TEST', }, ]; exports.default = testCases;