Skip to content
Myr

test: applyPatches invalid operation

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by aleclarson · committed by aleclarson · parent 42e426e · Browse files · 1 file+9 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−0 removed

  • tests:+9 added−0 removed

1 file+9 added−0 removed

modified:__tests__/patch.js+9 added
36 unmodified lines
37 runPatchTestHelper()38 })39}4041describe("applyPatches", () => {42 it('throws when `op` is not "add", "replace", nor "remove"', () => {43 expect(() => {44 const patch = {op: "copy", from: [0], path: [1]}45 applyPatches([2], [patch])46 }).toThrowError(/^Unsupported patch operation:/)47 })48})4950describe("simple assignment", () => {51 runPatchTest(52 {x: 3},53 d => {
221 unmodified lines