Skip to content

Commit

Permalink
Errors for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Feb 20, 2020
1 parent d005fab commit 67565dd
Show file tree
Hide file tree
Showing 20 changed files with 933 additions and 54 deletions.
633 changes: 633 additions & 0 deletions __tests__/__prod_snapshots__/base.js.snap

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions __tests__/__prod_snapshots__/curry.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`curry - es5 should check arguments 1`] = `"[Immer] minified error nr: 6"`;

exports[`curry - es5 should check arguments 2`] = `"[Immer] minified error nr: 6"`;

exports[`curry - es5 should check arguments 3`] = `"[Immer] minified error nr: 6"`;

exports[`curry - es5 should check arguments 4`] = `"[Immer] minified error nr: 7"`;

exports[`curry - proxy should check arguments 1`] = `"[Immer] minified error nr: 6"`;

exports[`curry - proxy should check arguments 2`] = `"[Immer] minified error nr: 6"`;

exports[`curry - proxy should check arguments 3`] = `"[Immer] minified error nr: 6"`;

exports[`curry - proxy should check arguments 4`] = `"[Immer] minified error nr: 7"`;
25 changes: 25 additions & 0 deletions __tests__/__prod_snapshots__/frozen.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`auto freeze - es5 will freeze maps 1`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - es5 will freeze maps 2`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - es5 will freeze maps 3`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - es5 will freeze sets 1`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - es5 will freeze sets 2`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - es5 will freeze sets 3`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - proxy will freeze maps 1`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - proxy will freeze maps 2`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - proxy will freeze maps 3`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - proxy will freeze sets 1`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - proxy will freeze sets 2`] = `"[Immer] minified error nr: 2"`;

exports[`auto freeze - proxy will freeze sets 3`] = `"[Immer] minified error nr: 2"`;
97 changes: 97 additions & 0 deletions __tests__/__prod_snapshots__/manual.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`manual - es5 cannot modify after finish 1`] = `"[Immer] minified error nr: 3 {\\"a\\":2}"`;

exports[`manual - es5 should check arguments 1`] = `"[Immer] minified error nr: 8"`;

exports[`manual - es5 should check arguments 2`] = `"[Immer] minified error nr: 8"`;

exports[`manual - es5 should check arguments 3`] = `"Cannot read property 'M' of undefined"`;

exports[`manual - es5 should not finish twice 1`] = `"Cannot read property 'length' of null"`;

exports[`manual - es5 should support patches drafts 1`] = `
Array [
Array [
Array [
Object {
"op": "replace",
"path": Array [
"a",
],
"value": 2,
},
Object {
"op": "add",
"path": Array [
"b",
],
"value": 3,
},
],
Array [
Object {
"op": "replace",
"path": Array [
"a",
],
"value": 1,
},
Object {
"op": "remove",
"path": Array [
"b",
],
},
],
],
]
`;

exports[`manual - proxy cannot modify after finish 1`] = `"Cannot perform 'set' on a proxy that has been revoked"`;

exports[`manual - proxy should check arguments 1`] = `"[Immer] minified error nr: 8"`;

exports[`manual - proxy should check arguments 2`] = `"[Immer] minified error nr: 8"`;

exports[`manual - proxy should check arguments 3`] = `"Cannot read property 'M' of undefined"`;

exports[`manual - proxy should not finish twice 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;

exports[`manual - proxy should support patches drafts 1`] = `
Array [
Array [
Array [
Object {
"op": "replace",
"path": Array [
"a",
],
"value": 2,
},
Object {
"op": "add",
"path": Array [
"b",
],
"value": 3,
},
],
Array [
Object {
"op": "replace",
"path": Array [
"a",
],
"value": 1,
},
Object {
"op": "remove",
"path": Array [
"b",
],
},
],
],
]
`;
7 changes: 7 additions & 0 deletions __tests__/__prod_snapshots__/patch.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`applyPatches throws when \`op\` is not "add", "replace", nor "remove" 1`] = `"[Immer] minified error nr: 17 copy"`;

exports[`applyPatches throws when \`path\` cannot be resolved 1`] = `"[Immer] minified error nr: 15 a/b"`;

exports[`applyPatches throws when \`path\` cannot be resolved 2`] = `"[Immer] minified error nr: 15 a/b/c"`;
3 changes: 3 additions & 0 deletions __tests__/__prod_snapshots__/readme.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Producers can update Maps 4`] = `"[Immer] minified error nr: 2"`;
Loading

0 comments on commit 67565dd

Please sign in to comment.