Skip to content
Myr

Merge pull request #213 from aleclarson/patch2

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

clarify array test names

authored by Michel Weststrate · committed by GitHub · parents 620f9bb, 8dc7d42 · Browse files · 1 file+7 added−7 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+7 added−7 removed

  • tests:+7 added−7 removed

1 file+7 added−7 removed

modified:__tests__/patch.js+7 added-7 removed
103 unmodified lines
104 ]105 )106})107108describe("arrays - 1", () => {108describe("arrays - prepend", () => {109 runPatchTest(110 {x: [1, 2, 3]},111 d => {112 d.x.unshift(4)
6 unmodified lines
119 ]120 )121})122123describe("arrays - 2", () => {123describe("arrays - splice middle", () => {124 runPatchTest(125 {x: [1, 2, 3]},126 d => {127 d.x.splice(1, 1)
4 unmodified lines
132 ]133 )134})135136describe("arrays - 3", () => {136describe("arrays - prepend then splice middle", () => {137 runPatchTest(138 {x: [1, 2, 3]},139 d => {140 d.x.unshift(4)
5 unmodified lines
146 ]147 )148})149150describe("arrays - 4", () => {150describe("arrays - splice middle then prepend", () => {151 runPatchTest(152 {x: [1, 2, 3]},153 d => {154 d.x.splice(1, 1)
5 unmodified lines
160 ]161 )162})163164describe("arrays - 5a", () => {164describe("arrays - truncate", () => {165 runPatchTest(166 {x: [1, 2, 3]},167 d => {168 d.x.length -= 2
5 unmodified lines
174 ]175 )176})177178describe("arrays - 5b", () => {178describe("arrays - pop twice", () => {179 runPatchTest(180 {x: [1, 2, 3]},181 d => {182 d.x.pop()
2 unmodified lines
185 [{op: "replace", path: ["x", "length"], value: 1}]186 )187})188189describe("arrays - 6", () => {189describe("arrays - push multiple", () => {190 runPatchTest(191 {x: [1, 2, 3]},192 d => {193 d.x.push(4, 5)
72 unmodified lines