Skip to content
Myr

chore: added unit test for #897

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

authored by Michel Weststrate · committed by Michel Weststrate · parent d8f2636 · Browse files · 1 file+10 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+10 added−0 removed

  • tests:+10 added−0 removed

1 file+10 added−0 removed

modified:__tests__/patch.js+10 added
1415 unmodified lines
1416 [{op: "replace", path: [2], value: 3}],1417 [1, 2, undefined]1418 )1419})14201421test("#897 appendPatch", () => {1422 const state0 = {a: []}1423 const state1 = applyPatches(state0, [{op: "add", path: ["a", "-"], value: 1}])1424 const state2 = applyPatches(state1, [{op: "add", path: ["a", "-"], value: 2}])1425 const state3 = applyPatches(state2, [{op: "add", path: ["a", "-"], value: 3}])1426 expect(state3).toEqual({1427 a: [1, 2, 3]1428 })1429})