Skip to content
Myr

patch.js

This file

Path

__tests__/patch.js

700 lines · 12.8 KiB · JavaScript

Last changed by

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

History of this file

Take it

The walk stopped after 200 commits: lines older than 53e9ce8 point at it.

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 1why, one step back
1"use strict"

chore: update import paths in testsaleclarsonbefore adoptioncdc09b1

line 2why, one step back
2import produce, {setUseProxies, applyPatches} from "../src/index"

perf: proxy assignaleclarsonbefore adoption53e9ce8

lines 3–5why, one step back
3
4jest.setTimeout(1000)5

Merge pull request #437 from runnez/es5-map-and-set-supportMichel Weststratebefore adoption85656cb

line 6why, one step back
6function runPatchTest(base, producer, patches, inversePathes) {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 7–38why, one step back
7 function runPatchTestHelper() {
8 let recordedPatches9 let recordedInversePatches1011 const res = produce(base, producer, (p, i) => {12 recordedPatches = p13 recordedInversePatches = i14 })1516 test("produces the correct patches", () => {17 expect(recordedPatches).toEqual(patches)18 if (inversePathes) expect(recordedInversePatches).toEqual(inversePathes)19 })2021 test("patches are replayable", () => {22 expect(applyPatches(base, recordedPatches)).toEqual(res)23 })2425 test("patches can be reversed", () => {26 expect(applyPatches(res, recordedInversePatches)).toEqual(base)27 })28 }2930 describe(`proxy`, () => {31 setUseProxies(true)32 runPatchTestHelper()33 })3435 describe(`es5`, () => {36 setUseProxies(false)37 runPatchTestHelper()38 })

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 39why, one step back
39}

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

line 40why, one step back
40

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 41why, one step back
41describe("applyPatches", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 42–78why, one step back
42 it("mutates the base state when it is a draft", () => {
43 produce({a: 1}, draft => {44 const result = applyPatches(draft, [45 {op: "replace", path: ["a"], value: 2}46 ])47 expect(result).toBe(draft)48 expect(draft.a).toBe(2)49 })50 })51 it("produces a copy of the base state when not a draft", () => {52 const base = {a: 1}53 const result = applyPatches(base, [{op: "replace", path: ["a"], value: 2}])54 expect(result).not.toBe(base)55 expect(result.a).toBe(2)56 expect(base.a).toBe(1)57 })58 it('throws when `op` is not "add", "replace", nor "remove"', () => {59 expect(() => {60 const patch = {op: "copy", from: [0], path: [1]}61 applyPatches([2], [patch])62 }).toThrowErrorMatchingSnapshot()63 })64 it("throws when `path` cannot be resolved", () => {65 // missing parent66 expect(() => {67 const patch = {op: "add", path: ["a", "b"], value: 1}68 applyPatches({}, [patch])69 }).toThrowErrorMatchingSnapshot()7071 // missing grand-parent72 expect(() => {73 const patch = {op: "add", path: ["a", "b", "c"], value: 1}74 applyPatches({}, [patch])75 }).toThrowErrorMatchingSnapshot()76 })77})78

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 79why, one step back
79describe("simple assignment - 1", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 80–88why, one step back
80 runPatchTest(
81 {x: 3},82 d => {83 d.x++84 },85 [{op: "replace", path: ["x"], value: 4}]86 )87})88

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 89why, one step back
89describe("simple assignment - 2", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 90–98why, one step back
90 runPatchTest(
91 {x: {y: 4}},92 d => {93 d.x.y++94 },95 [{op: "replace", path: ["x", "y"], value: 5}]96 )97})98

feat: improved array patchesIlyas Kabirovbefore adoptioncb5707f

line 99why, one step back
99describe("simple assignment - 3", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 100–108why, one step back
100 runPatchTest(
101 {x: [{y: 4}]},102 d => {103 d.x[0].y++104 },105 [{op: "replace", path: ["x", 0, "y"], value: 5}]106 )107})108

feat: `Map` drafts and patcheskeenondrumsbefore adoption30db0f3

line 109why, one step back
109describe("simple assignment - 4", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 110–119why, one step back
110 runPatchTest(
111 new Map([["x", {y: 4}]]),112 d => {113 d.get("x").y++114 },115 [{op: "replace", path: ["x", "y"], value: 5}],116 [{op: "replace", path: ["x", "y"], value: 4}]117 )118})119

feat: `Map` drafts and patcheskeenondrumsbefore adoption30db0f3

line 120why, one step back
120describe("simple assignment - 5", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 121–130why, one step back
121 runPatchTest(
122 {x: new Map([["y", 4]])},123 d => {124 d.x.set("y", 5)125 },126 [{op: "replace", path: ["x", "y"], value: 5}],127 [{op: "replace", path: ["x", "y"], value: 4}]128 )129})130

fix: Map.prototype.set should return a draftAndrey Goncharovbefore adoption7001201

line 131why, one step back
131describe("simple assignment - 6", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 132–146why, one step back
132 runPatchTest(
133 new Map([["x", 1]]),134 d => {135 // Map.prototype.set should return the Map itself136 const res = d.set("x", 2)137 res.set("y", 3)138 },139 [140 {op: "replace", path: ["x"], value: 2},141 {op: "add", path: ["y"], value: 3}142 ],143 [{op: "replace", path: ["x"], value: 1}, {op: "remove", path: ["y"]}]144 )145})146

feat: add support of non-primitive keys for `Maps`keenondrumsbefore adoption6501ec5

line 147why, one step back
147describe("simple assignment - 7", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 148–166why, one step back
148 const key1 = {prop: "val1"}
149 const key2 = {prop: "val2"}150 runPatchTest(151 {x: new Map([[key1, 4]])},152 d => {153 d.x.set(key1, 5)154 d.x.set(key2, 6)155 },156 [157 {op: "replace", path: ["x", key1], value: 5},158 {op: "add", path: ["x", key2], value: 6}159 ],160 [161 {op: "replace", path: ["x", key1], value: 4},162 {op: "remove", path: ["x", key2]}163 ]164 )165})166

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 167why, one step back
167describe("delete 1", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 168–176why, one step back
168 runPatchTest(
169 {x: {y: 4}},170 d => {171 delete d.x172 },173 [{op: "remove", path: ["x"]}]174 )175})176

feat: `Map` drafts and patcheskeenondrumsbefore adoption30db0f3

line 177why, one step back
177describe("delete 2", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 178–187why, one step back
178 runPatchTest(
179 new Map([["x", 1]]),180 d => {181 d.delete("x")182 },183 [{op: "remove", path: ["x"]}],184 [{op: "add", path: ["x"], value: 1}]185 )186})187

feat: `Map` drafts and patcheskeenondrumsbefore adoption30db0f3

line 188why, one step back
188describe("delete 3", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 189–198why, one step back
189 runPatchTest(
190 {x: new Map([["y", 1]])},191 d => {192 d.x.delete("y")193 },194 [{op: "remove", path: ["x", "y"]}],195 [{op: "add", path: ["x", "y"], value: 1}]196 )197})198

feat: add support of non-primitive keys for `Maps`keenondrumsbefore adoption6501ec5

line 199why, one step back
199describe("delete 5", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 200–215why, one step back
200 const key1 = {prop: "val1"}
201 const key2 = {prop: "val2"}202 runPatchTest(203 {x: new Map([[key1, 1], [key2, 2]])},204 d => {205 d.x.delete(key1)206 d.x.delete(key2)207 },208 [{op: "remove", path: ["x", key1]}, {op: "remove", path: ["x", key2]}],209 [210 {op: "add", path: ["x", key1], value: 1},211 {op: "add", path: ["x", key2], value: 2}212 ]213 )214})215

feat: add support of non-primitive keys for `Maps`keenondrumsbefore adoption6501ec5

line 216why, one step back
216describe("delete 6", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 217–226why, one step back
217 runPatchTest(
218 new Set(["x", 1]),219 d => {220 d.delete("x")221 },222 [{op: "remove", path: [0], value: "x"}],223 [{op: "add", path: [0], value: "x"}]224 )225})226

feat: add support of non-primitive keys for `Maps`keenondrumsbefore adoption6501ec5

line 227why, one step back
227describe("delete 7", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 228–237why, one step back
228 runPatchTest(
229 {x: new Set(["y", 1])},230 d => {231 d.x.delete("y")232 },233 [{op: "remove", path: ["x", 0], value: "y"}],234 [{op: "add", path: ["x", 0], value: "y"}]235 )236})237

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 238why, one step back
238describe("renaming properties", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 239–364why, one step back
239 describe("nested object (no changes)", () => {
240 runPatchTest(241 {a: {b: 1}},242 d => {243 d.x = d.a244 delete d.a245 },246 [{op: "add", path: ["x"], value: {b: 1}}, {op: "remove", path: ["a"]}]247 )248 })249250 describe("nested map (no changes)", () => {251 runPatchTest(252 new Map([["a", new Map([["b", 1]])]]),253 d => {254 d.set("x", d.get("a"))255 d.delete("a")256 },257 [258 {op: "add", path: ["x"], value: new Map([["b", 1]])},259 {op: "remove", path: ["a"]}260 ],261 [262 {op: "remove", path: ["x"]},263 {op: "add", path: ["a"], value: new Map([["b", 1]])}264 ]265 )266 })267268 describe("nested object (with changes)", () => {269 runPatchTest(270 {a: {b: 1, c: 1}},271 d => {272 let a = d.a273 a.b = 2 // change274 delete a.c // delete275 a.y = 2 // add276277 // rename278 d.x = a279 delete d.a280 },281 [282 {op: "add", path: ["x"], value: {b: 2, y: 2}},283 {op: "remove", path: ["a"]}284 ]285 )286 })287288 describe("nested map (with changes)", () => {289 runPatchTest(290 new Map([["a", new Map([["b", 1], ["c", 1]])]]),291 d => {292 let a = d.get("a")293 a.set("b", 2) // change294 a.delete("c") // delete295 a.set("y", 2) // add296297 // rename298 d.set("x", a)299 d.delete("a")300 },301 [302 {op: "add", path: ["x"], value: new Map([["b", 2], ["y", 2]])},303 {op: "remove", path: ["a"]}304 ],305 [306 {op: "remove", path: ["x"]},307 {op: "add", path: ["a"], value: new Map([["b", 1], ["c", 1]])}308 ]309 )310 })311312 describe("deeply nested object (with changes)", () => {313 runPatchTest(314 {a: {b: {c: 1, d: 1}}},315 d => {316 let b = d.a.b317 b.c = 2 // change318 delete b.d // delete319 b.y = 2 // add320321 // rename322 d.a.x = b323 delete d.a.b324 },325 [326 {op: "add", path: ["a", "x"], value: {c: 2, y: 2}},327 {op: "remove", path: ["a", "b"]}328 ]329 )330 })331332 describe("deeply nested map (with changes)", () => {333 runPatchTest(334 new Map([["a", new Map([["b", new Map([["c", 1], ["d", 1]])]])]]),335 d => {336 let b = d.get("a").get("b")337 b.set("c", 2) // change338 b.delete("d") // delete339 b.set("y", 2) // add340341 // rename342 d.get("a").set("x", b)343 d.get("a").delete("b")344 },345 [346 {347 op: "add",348 path: ["a", "x"],349 value: new Map([["c", 2], ["y", 2]])350 },351 {op: "remove", path: ["a", "b"]}352 ],353 [354 {op: "remove", path: ["a", "x"]},355 {356 op: "add",357 path: ["a", "b"],358 value: new Map([["c", 1], ["d", 1]])359 }360 ]361 )362 })363})364

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 365why, one step back
365describe("minimum amount of changes", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 366–379why, one step back
366 runPatchTest(
367 {x: 3, y: {a: 4}, z: 3},368 d => {369 d.y.a = 4370 d.y.b = 5371 Object.assign(d, {x: 4, y: {a: 2}})372 },373 [374 {op: "replace", path: ["x"], value: 4},375 {op: "replace", path: ["y"], value: {a: 2}}376 ]377 )378})379

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 380why, one step back
380describe("arrays - prepend", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 381–389why, one step back
381 runPatchTest(
382 {x: [1, 2, 3]},383 d => {384 d.x.unshift(4)385 },386 [{op: "add", path: ["x", 0], value: 4}]387 )388})389

feat: improved array patchesIlyas Kabirovbefore adoptioncb5707f

line 390why, one step back
390describe("arrays - multiple prepend", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 391–403why, one step back
391 runPatchTest(
392 {x: [1, 2, 3]},393 d => {394 d.x.unshift(4)395 d.x.unshift(5)396 },397 [398 {op: "add", path: ["x", 0], value: 5},399 {op: "add", path: ["x", 1], value: 4}400 ]401 )402})403

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 404why, one step back
404describe("arrays - splice middle", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 405–413why, one step back
405 runPatchTest(
406 {x: [1, 2, 3]},407 d => {408 d.x.splice(1, 1)409 },410 [{op: "remove", path: ["x", 1]}]411 )412})413

feat: improved array patchesIlyas Kabirovbefore adoptioncb5707f

line 414why, one step back
414describe("arrays - multiple splice", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 415–429why, one step back
415 runPatchTest(
416 [0, 1, 2, 3, 4, 5, 0],417 d => {418 d.splice(4, 2, 3)419 d.splice(1, 2, 3)420 },421 [422 {op: "replace", path: [1], value: 3},423 {op: "replace", path: [2], value: 3},424 {op: "remove", path: [5]},425 {op: "remove", path: [4]}426 ]427 )428})429

feat: improved array patchesIlyas Kabirovbefore adoptioncb5707f

line 430why, one step back
430describe("arrays - modify and shrink", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 431–443why, one step back
431 runPatchTest(
432 {x: [1, 2, 3]},433 d => {434 d.x[0] = 4435 d.x.length = 2436 },437 [438 {op: "replace", path: ["x", 0], value: 4},439 {op: "replace", path: ["x", "length"], value: 2}440 ]441 )442})443

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 444why, one step back
444describe("arrays - prepend then splice middle", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 445–457why, one step back
445 runPatchTest(
446 {x: [1, 2, 3]},447 d => {448 d.x.unshift(4)449 d.x.splice(2, 1)450 },451 [452 {op: "replace", path: ["x", 0], value: 4},453 {op: "replace", path: ["x", 1], value: 1}454 ]455 )456})457

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 458why, one step back
458describe("arrays - splice middle then prepend", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 459–471why, one step back
459 runPatchTest(
460 {x: [1, 2, 3]},461 d => {462 d.x.splice(1, 1)463 d.x.unshift(4)464 },465 [466 {op: "replace", path: ["x", 0], value: 4},467 {op: "replace", path: ["x", 1], value: 1}468 ]469 )470})471

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 472why, one step back
472describe("arrays - truncate", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 473–485why, one step back
473 runPatchTest(
474 {x: [1, 2, 3]},475 d => {476 d.x.length -= 2477 },478 [{op: "replace", path: ["x", "length"], value: 1}],479 [480 {op: "add", path: ["x", 1], value: 2},481 {op: "add", path: ["x", 2], value: 3}482 ]483 )484})485

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 486why, one step back
486describe("arrays - pop twice", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 487–496why, one step back
487 runPatchTest(
488 {x: [1, 2, 3]},489 d => {490 d.x.pop()491 d.x.pop()492 },493 [{op: "replace", path: ["x", "length"], value: 1}]494 )495})496

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 497why, one step back
497describe("arrays - push multiple", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 498–510why, one step back
498 runPatchTest(
499 {x: [1, 2, 3]},500 d => {501 d.x.push(4, 5)502 },503 [504 {op: "add", path: ["x", 3], value: 4},505 {op: "add", path: ["x", 4], value: 5}506 ],507 [{op: "replace", path: ["x", "length"], value: 3}]508 )509})510

feat: improved array patchesIlyas Kabirovbefore adoptioncb5707f

line 511why, one step back
511describe("arrays - splice (expand)", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 512–529why, one step back
512 runPatchTest(
513 {x: [1, 2, 3]},514 d => {515 d.x.splice(1, 1, 4, 5, 6)516 },517 [518 {op: "replace", path: ["x", 1], value: 4},519 {op: "add", path: ["x", 2], value: 5},520 {op: "add", path: ["x", 3], value: 6}521 ],522 [523 {op: "replace", path: ["x", 1], value: 2},524 {op: "remove", path: ["x", 3]},525 {op: "remove", path: ["x", 2]}526 ]527 )528})529

feat: improved array patchesIlyas Kabirovbefore adoptioncb5707f

line 530why, one step back
530describe("arrays - splice (shrink)", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 531–548why, one step back
531 runPatchTest(
532 {x: [1, 2, 3, 4, 5]},533 d => {534 d.x.splice(1, 3, 6)535 },536 [537 {op: "replace", path: ["x", 1], value: 6},538 {op: "remove", path: ["x", 3]},539 {op: "remove", path: ["x", 2]}540 ],541 [542 {op: "replace", path: ["x", 1], value: 2},543 {op: "add", path: ["x", 2], value: 3},544 {op: "add", path: ["x", 3], value: 4}545 ]546 )547})548

feat: `Set` draftsAndrey Goncharovbefore adoption4355b63

line 549why, one step back
549describe("sets - add - 1", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 550–559why, one step back
550 runPatchTest(
551 new Set([1]),552 d => {553 d.add(2)554 },555 [{op: "add", path: [1], value: 2}],556 [{op: "remove", path: [1], value: 2}]557 )558})559

feat: `Set` draftsAndrey Goncharovbefore adoption4355b63

line 560why, one step back
560describe("sets - add, delete, add - 1", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 561–572why, one step back
561 runPatchTest(
562 new Set([1]),563 d => {564 d.add(2)565 d.delete(2)566 d.add(2)567 },568 [{op: "add", path: [1], value: 2}],569 [{op: "remove", path: [1], value: 2}]570 )571})572

feat: `Set` draftsAndrey Goncharovbefore adoption4355b63

line 573why, one step back
573describe("sets - add, delete, add - 2", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 574–585why, one step back
574 runPatchTest(
575 new Set([2, 1]),576 d => {577 d.add(2)578 d.delete(2)579 d.add(2)580 },581 [],582 []583 )584})585

feat: `Set` draftsAndrey Goncharovbefore adoption4355b63

line 586why, one step back
586describe("sets - mutate - 1", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 587–614why, one step back
587 const findById = (set, id) => {
588 for (const item of set) {589 if (item.id === id) return item590 }591 }592 runPatchTest(593 new Set([{id: 1, val: "We"}, {id: 2, val: "will"}]),594 d => {595 const obj1 = findById(d, 1)596 const obj2 = findById(d, 2)597 obj1.val = "rock"598 obj2.val = "you"599 },600 [601 {op: "remove", path: [0], value: {id: 1, val: "We"}},602 {op: "remove", path: [1], value: {id: 2, val: "will"}},603 {op: "add", path: [0], value: {id: 1, val: "rock"}},604 {op: "add", path: [1], value: {id: 2, val: "you"}}605 ],606 [607 {op: "remove", path: [1], value: {id: 2, val: "you"}},608 {op: "remove", path: [0], value: {id: 1, val: "rock"}},609 {op: "add", path: [1], value: {id: 2, val: "will"}},610 {op: "add", path: [0], value: {id: 1, val: "We"}}611 ]612 )613})614

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 615why, one step back
615describe("simple replacement", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 616–618why, one step back
616 runPatchTest({x: 3}, _d => 4, [{op: "replace", path: [], value: 4}])
617})618

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 619why, one step back
619describe("same value replacement - 1", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 620–629why, one step back
620 runPatchTest(
621 {x: {y: 3}},622 d => {623 const a = d.x624 d.x = a625 },626 []627 )628})629

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 630why, one step back
630describe("same value replacement - 2", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 631–641why, one step back
631 runPatchTest(
632 {x: {y: 3}},633 d => {634 const a = d.x635 d.x = 4636 d.x = a637 },638 []639 )640})641

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 642why, one step back
642describe("same value replacement - 3", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 643–651why, one step back
643 runPatchTest(
644 {x: 3},645 d => {646 d.x = 3647 },648 []649 )650})651

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 652why, one step back
652describe("same value replacement - 4", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 653–662why, one step back
653 runPatchTest(
654 {x: 3},655 d => {656 d.x = 4657 d.x = 3658 },659 []660 )661})662

feat: `Map` drafts and patcheskeenondrumsbefore adoption30db0f3

line 663why, one step back
663describe("same value replacement - 5", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 664–674why, one step back
664 runPatchTest(
665 new Map([["x", 3]]),666 d => {667 d.set("x", 4)668 d.set("x", 3)669 },670 [],671 []672 )673})674

feat: `Set` draftsAndrey Goncharovbefore adoption4355b63

line 675why, one step back
675describe("same value replacement - 6", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 676–686why, one step back
676 runPatchTest(
677 new Set(["x", 3]),678 d => {679 d.delete("x")680 d.add("x")681 },682 [],683 []684 )685})686

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 687why, one step back
687describe("simple delete", () => {

run prettier with master config before mergingMichel Weststratebefore adoptionae80361

lines 688–699why, one step back
688 runPatchTest(
689 {x: 2},690 d => {691 delete d.x692 },693 [694 {695 op: "remove",696 path: ["x"]697 }698 ]699 )

perf: proxy assignaleclarsonbefore adoption53e9ce8

line 700why, one step back
700})