Skip to content
Myr

fixes

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 ac57da5 · Browse files · 6 files+74 added−74 removed
This commit

State

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

Diff stats

6 files+74 added−74 removed

  • tests:+73 added−73 removed
  • other:+1 added−1 removed

6 files+74 added−74 removed

modified:__tests__/__snapshots__/base.js.snap+51 added-51 removed
1// Jest Snapshot v1, https://goo.gl/fbAQLP23exports[`base functionality - es5 (autofreeze) async recipe function works with rejected promises 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;3exports[`base functionality - es5 (autofreeze) async recipe function works with rejected promises 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;45exports[`base functionality - es5 (autofreeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;5exports[`base functionality - es5 (autofreeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;67exports[`base functionality - es5 (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;7exports[`base functionality - es5 (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;89exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;9exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;1011exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 2`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;11exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 2`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;1213exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 3`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;13exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 3`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;1415exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 4`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;15exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 4`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;1617exports[`base functionality - es5 (autofreeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;17exports[`base functionality - es5 (autofreeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;1819exports[`base functionality - es5 (autofreeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;19exports[`base functionality - es5 (autofreeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;2021exports[`base functionality - es5 (autofreeze)(patch listener) async recipe function works with rejected promises 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;21exports[`base functionality - es5 (autofreeze)(patch listener) async recipe function works with rejected promises 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;2223exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;23exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;2425exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;25exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;2627exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;27exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;2829exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 2`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;29exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 2`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;3031exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 3`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;31exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 3`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;3233exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 4`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;33exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 4`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;3435exports[`base functionality - es5 (autofreeze)(patch listener) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;35exports[`base functionality - es5 (autofreeze)(patch listener) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;3637exports[`base functionality - es5 (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;37exports[`base functionality - es5 (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;3839exports[`base functionality - es5 (no freeze) async recipe function works with rejected promises 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;39exports[`base functionality - es5 (no freeze) async recipe function works with rejected promises 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;4041exports[`base functionality - es5 (no freeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;41exports[`base functionality - es5 (no freeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;4243exports[`base functionality - es5 (no freeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;43exports[`base functionality - es5 (no freeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;4445exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;45exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;4647exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 2`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;47exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 2`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;4849exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 3`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;49exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 3`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;5051exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 4`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;51exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 4`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;5253exports[`base functionality - es5 (no freeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;53exports[`base functionality - es5 (no freeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;5455exports[`base functionality - es5 (no freeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;55exports[`base functionality - es5 (no freeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;5657exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is added 1`] = `"Immer only supports setting array indices and the 'length' property"`;57exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is added 1`] = `"Invariant failed: Immer only supports setting array indices and the 'length' property"`;5859exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is deleted 1`] = `"Immer only supports deleting array indices"`;59exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is deleted 1`] = `"Invariant failed: Immer only supports deleting array indices"`;6061exports[`base functionality - proxy (autofreeze) async recipe function works with rejected promises 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;6263exports[`base functionality - proxy (autofreeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;63exports[`base functionality - proxy (autofreeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;6465exports[`base functionality - proxy (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;65exports[`base functionality - proxy (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;6667exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;6869exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 2`] = `"Cannot perform 'set' on a proxy that has been revoked"`;
9 unmodified lines
79exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 7`] = `"Cannot perform 'get' on a proxy that has been revoked"`;8081exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 8`] = `"Cannot perform 'set' on a proxy that has been revoked"`;8283exports[`base functionality - proxy (autofreeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;83exports[`base functionality - proxy (autofreeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;8485exports[`base functionality - proxy (autofreeze) throws when Object.defineProperty() is used on drafts 1`] = `"Object.defineProperty() cannot be used on an Immer draft"`;85exports[`base functionality - proxy (autofreeze) throws when Object.defineProperty() is used on drafts 1`] = `"Invariant failed: Object.defineProperty() cannot be used on an Immer draft"`;8687exports[`base functionality - proxy (autofreeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Object.setPrototypeOf() cannot be used on an Immer draft"`;87exports[`base functionality - proxy (autofreeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Invariant failed: Object.setPrototypeOf() cannot be used on an Immer draft"`;8889exports[`base functionality - proxy (autofreeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;89exports[`base functionality - proxy (autofreeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;9091exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is added 1`] = `"Immer only supports setting array indices and the 'length' property"`;91exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is added 1`] = `"Invariant failed: Immer only supports setting array indices and the 'length' property"`;9293exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is deleted 1`] = `"Immer only supports deleting array indices"`;93exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is deleted 1`] = `"Invariant failed: Immer only supports deleting array indices"`;9495exports[`base functionality - proxy (autofreeze)(patch listener) async recipe function works with rejected promises 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;9697exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;97exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;9899exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;99exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;100101exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;102103exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 2`] = `"Cannot perform 'set' on a proxy that has been revoked"`;
9 unmodified lines
113exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 7`] = `"Cannot perform 'get' on a proxy that has been revoked"`;114115exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 8`] = `"Cannot perform 'set' on a proxy that has been revoked"`;116117exports[`base functionality - proxy (autofreeze)(patch listener) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;117exports[`base functionality - proxy (autofreeze)(patch listener) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;118119exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.defineProperty() is used on drafts 1`] = `"Object.defineProperty() cannot be used on an Immer draft"`;119exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.defineProperty() is used on drafts 1`] = `"Invariant failed: Object.defineProperty() cannot be used on an Immer draft"`;120121exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Object.setPrototypeOf() cannot be used on an Immer draft"`;121exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Invariant failed: Object.setPrototypeOf() cannot be used on an Immer draft"`;122123exports[`base functionality - proxy (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;123exports[`base functionality - proxy (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;124125exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is added 1`] = `"Immer only supports setting array indices and the 'length' property"`;125exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is added 1`] = `"Invariant failed: Immer only supports setting array indices and the 'length' property"`;126127exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is deleted 1`] = `"Immer only supports deleting array indices"`;127exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is deleted 1`] = `"Invariant failed: Immer only supports deleting array indices"`;128129exports[`base functionality - proxy (no freeze) async recipe function works with rejected promises 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;130131exports[`base functionality - proxy (no freeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;131exports[`base functionality - proxy (no freeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;132133exports[`base functionality - proxy (no freeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;133exports[`base functionality - proxy (no freeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;134135exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;136137exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 2`] = `"Cannot perform 'set' on a proxy that has been revoked"`;
9 unmodified lines
147exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 7`] = `"Cannot perform 'get' on a proxy that has been revoked"`;148149exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 8`] = `"Cannot perform 'set' on a proxy that has been revoked"`;150151exports[`base functionality - proxy (no freeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;151exports[`base functionality - proxy (no freeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;152153exports[`base functionality - proxy (no freeze) throws when Object.defineProperty() is used on drafts 1`] = `"Object.defineProperty() cannot be used on an Immer draft"`;153exports[`base functionality - proxy (no freeze) throws when Object.defineProperty() is used on drafts 1`] = `"Invariant failed: Object.defineProperty() cannot be used on an Immer draft"`;154155exports[`base functionality - proxy (no freeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Object.setPrototypeOf() cannot be used on an Immer draft"`;155exports[`base functionality - proxy (no freeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Invariant failed: Object.setPrototypeOf() cannot be used on an Immer draft"`;156157exports[`base functionality - proxy (no freeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;157exports[`base functionality - proxy (no freeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;158159exports[`complex nesting map / set / object modify deep object 1`] = `160Object {161 "map": Map {
278 unmodified lines
modified:__tests__/__snapshots__/curry.js.snap+8 added-8 removed
1// Jest Snapshot v1, https://goo.gl/fbAQLP23exports[`curry - es5 should check arguments 1`] = `"The first or second argument to \`produce\` must be a function"`;3exports[`curry - es5 should check arguments 1`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;45exports[`curry - es5 should check arguments 2`] = `"The first or second argument to \`produce\` must be a function"`;5exports[`curry - es5 should check arguments 2`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;67exports[`curry - es5 should check arguments 3`] = `"The first or second argument to \`produce\` must be a function"`;7exports[`curry - es5 should check arguments 3`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;89exports[`curry - es5 should check arguments 4`] = `"The third argument to \`produce\` must be a function or undefined"`;9exports[`curry - es5 should check arguments 4`] = `"Invariant failed: The third argument to \`produce\` must be a function or undefined"`;1011exports[`curry - proxy should check arguments 1`] = `"The first or second argument to \`produce\` must be a function"`;11exports[`curry - proxy should check arguments 1`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;1213exports[`curry - proxy should check arguments 2`] = `"The first or second argument to \`produce\` must be a function"`;13exports[`curry - proxy should check arguments 2`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;1415exports[`curry - proxy should check arguments 3`] = `"The first or second argument to \`produce\` must be a function"`;15exports[`curry - proxy should check arguments 3`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;1617exports[`curry - proxy should check arguments 4`] = `"The third argument to \`produce\` must be a function or undefined"`;17exports[`curry - proxy should check arguments 4`] = `"Invariant failed: The third argument to \`produce\` must be a function or undefined"`;
modified:__tests__/__snapshots__/manual.js.snap+10 added-10 removed
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}"`;3exports[`manual - es5 cannot modify after finish 1`] = `"Invariant failed: 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\` must be a plain object, an array, or an immerable object"`;5exports[`manual - es5 should check arguments 1`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;67exports[`manual - es5 should check arguments 2`] = `"First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;7exports[`manual - es5 should check arguments 2`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;89exports[`manual - es5 should check arguments 3`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;9exports[`manual - es5 should check arguments 3`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;1011exports[`manual - es5 should not finish drafts from produce 1`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;11exports[`manual - es5 should not finish drafts from produce 1`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;1213exports[`manual - es5 should not finish twice 1`] = `"The given draft is already finalized"`;13exports[`manual - es5 should not finish twice 1`] = `"Invariant failed: The given draft is already finalized"`;1415exports[`manual - es5 should support patches drafts 1`] = `16Array [17 Array [
33 unmodified lines
51`;5253exports[`manual - proxy cannot modify after finish 1`] = `"Cannot perform 'set' on a proxy that has been revoked"`;5455exports[`manual - proxy should check arguments 1`] = `"First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;55exports[`manual - proxy should check arguments 1`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;5657exports[`manual - proxy should check arguments 2`] = `"First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;57exports[`manual - proxy should check arguments 2`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;5859exports[`manual - proxy should check arguments 3`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;59exports[`manual - proxy should check arguments 3`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;6061exports[`manual - proxy should not finish drafts from produce 1`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;61exports[`manual - proxy should not finish drafts from produce 1`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;6263exports[`manual - proxy should not finish twice 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;6465exports[`manual - proxy should support patches drafts 1`] = `
36 unmodified lines
modified:__tests__/__snapshots__/patch.js.snap+3 added-3 removed
1// Jest Snapshot v1, https://goo.gl/fbAQLP23exports[`applyPatches throws when \`op\` is not "add", "replace", nor "remove" 1`] = `"Unsupported patch operation: copy"`;3exports[`applyPatches throws when \`op\` is not "add", "replace", nor "remove" 1`] = `"Invariant failed: Unsupported patch operation: copy"`;45exports[`applyPatches throws when \`path\` cannot be resolved 1`] = `"Cannot apply patch, path doesn't resolve: a/b"`;5exports[`applyPatches throws when \`path\` cannot be resolved 1`] = `"Invariant failed: Cannot apply patch, path doesn't resolve: a/b"`;67exports[`applyPatches throws when \`path\` cannot be resolved 2`] = `"Cannot apply patch, path doesn't resolve: a/b/c"`;7exports[`applyPatches throws when \`path\` cannot be resolved 2`] = `"Invariant failed: Cannot apply patch, path doesn't resolve: a/b/c"`;
modified:__tests__/readme.js+1 added-1 removed
231 unmodified lines
232 // The old one was never modified233 expect(usersById_v1.size).toBe(0)234 // And trying to change a Map outside a producers is going to: NO!235 expect(() => usersById_v3.clear()).toThrowErrorMatchingInlineSnapshot(236 `"This object has been frozen and should not be mutated"`236 `"Invariant failed: This object has been frozen and should not be mutated"`237 )238})
modified:jest.config.build.js+1 added-1 removed