Skip to content
Myr

test: use snapshots in createDraft tests

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

authored by aleclarson · committed by aleclarson · parent 44ef0c8 · Browse files · 2 files+108 added−40 removed
This commit

State

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

Diff stats

2 files+108 added−40 removed

  • tests:+108 added−40 removed

2 files+108 added−40 removed

added:__tests__/__snapshots__/manual.js.snap+93 added
1// Jest Snapshot v1, https://goo.gl/fbAQLP23exports[`manual - es5 cannot modify after finish 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":2}"`;45exports[`manual - es5 should check arguments 1`] = `"First argument to createDraft should be a plain object, an array, or an immerable object."`;67exports[`manual - es5 should check arguments 2`] = `"First argument to createDraft should be a plain object, an array, or an immerable object."`;89exports[`manual - es5 should check arguments 3`] = `"First argument to finishDraft should be an object from createDraft."`;1011exports[`manual - es5 should support patches drafts 1`] = `12Array [13 Array [14 Array [15 Object {16 "op": "replace",17 "path": Array [18 "a",19 ],20 "value": 2,21 },22 Object {23 "op": "add",24 "path": Array [25 "b",26 ],27 "value": 3,28 },29 ],30 Array [31 Object {32 "op": "replace",33 "path": Array [34 "a",35 ],36 "value": 1,37 },38 Object {39 "op": "remove",40 "path": Array [41 "b",42 ],43 },44 ],45 ],46]47`;4849exports[`manual - proxy cannot modify after finish 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":2}"`;5051exports[`manual - proxy should check arguments 1`] = `"First argument to createDraft should be a plain object, an array, or an immerable object."`;5253exports[`manual - proxy should check arguments 2`] = `"First argument to createDraft should be a plain object, an array, or an immerable object."`;5455exports[`manual - proxy should check arguments 3`] = `"First argument to finishDraft should be an object from createDraft."`;5657exports[`manual - proxy should support patches drafts 1`] = `58Array [59 Array [60 Array [61 Object {62 "op": "replace",63 "path": Array [64 "a",65 ],66 "value": 2,67 },68 Object {69 "op": "add",70 "path": Array [71 "b",72 ],73 "value": 3,74 },75 ],76 Array [77 Object {78 "op": "replace",79 "path": Array [80 "a",81 ],82 "value": 1,83 },84 Object {85 "op": "remove",86 "path": Array [87 "b",88 ],89 },90 ],91 ],92]93`;
modified:__tests__/manual.js+15 added-40 removed