@@ -71,7 +71,7 @@ test('Unexpected operation check of Set draft', () => {
7171 // @ts -ignore
7272 draft . x = 1 ;
7373 } ) ;
74- } ) . not . toThrowError ( ) ;
74+ } ) . not . toThrow ( ) ;
7575 }
7676 {
7777 const data = new Set ( [ 1 ] ) ;
@@ -80,7 +80,7 @@ test('Unexpected operation check of Set draft', () => {
8080 // @ts -ignore
8181 draft . x = 1 ;
8282 } ) ;
83- } ) . toThrowError ( `Map/Set draft does not support any property assignment.` ) ;
83+ } ) . toThrow ( `Map/Set draft does not support any property assignment.` ) ;
8484 }
8585} ) ;
8686
@@ -94,7 +94,7 @@ test('Unexpected operation check of Map draft', () => {
9494 // @ts -ignore
9595 draft . x = 1 ;
9696 } ) ;
97- } ) . not . toThrowError ( ) ;
97+ } ) . not . toThrow ( ) ;
9898 }
9999
100100 {
@@ -104,7 +104,7 @@ test('Unexpected operation check of Map draft', () => {
104104 // @ts -ignore
105105 draft . x = 1 ;
106106 } ) ;
107- } ) . toThrowError ( `Map/Set draft does not support any property assignment.` ) ;
107+ } ) . toThrow ( `Map/Set draft does not support any property assignment.` ) ;
108108 }
109109} ) ;
110110
@@ -123,7 +123,7 @@ test('immer failed case - freeze Map key', () => {
123123 expect ( ( ) => {
124124 // @ts -ignore
125125 Array . from ( state . keys ( ) ) [ 0 ] . a = 2 ;
126- } ) . not . toThrowError ( ) ;
126+ } ) . not . toThrow ( ) ;
127127 }
128128
129129 {
@@ -141,7 +141,7 @@ test('immer failed case - freeze Map key', () => {
141141 expect ( ( ) => {
142142 // @ts -ignore
143143 Array . from ( state . keys ( ) ) [ 0 ] . a = 2 ;
144- } ) . toThrowError ( ) ;
144+ } ) . toThrow ( ) ;
145145 }
146146} ) ;
147147
@@ -165,7 +165,7 @@ test('immer failed case - escaped draft', () => {
165165
166166 expect ( ( ) => {
167167 JSON . stringify ( state ) ;
168- } ) . toThrowError ( ) ;
168+ } ) . toThrow ( ) ;
169169 }
170170
171171 {
@@ -186,7 +186,7 @@ test('immer failed case - escaped draft', () => {
186186
187187 expect ( ( ) => {
188188 JSON . stringify ( state ) ;
189- } ) . not . toThrowError ( ) ;
189+ } ) . not . toThrow ( ) ;
190190 }
191191} ) ;
192192
@@ -270,7 +270,7 @@ test('circular reference', () => {
270270 produce ( data , ( ) => {
271271 //
272272 } ) ;
273- } ) . not . toThrowError ( ) ;
273+ } ) . not . toThrow ( ) ;
274274 }
275275
276276 {
@@ -350,10 +350,10 @@ test('#18 - set: assigning a non-draft with the same key - 1', () => {
350350 // @ts -ignore
351351 // eslint-disable-next-line no-unused-expressions
352352 Array . from ( produced [ 0 ] . array [ 0 ] . one ) [ 0 ] . three ;
353- } ) . toThrowError ( ) ;
353+ } ) . toThrow ( ) ;
354354
355355 // @ts -ignore
356- expect ( ( ) => applyPatches ( baseState , produced [ 1 ] ) ) . toThrowError ( ) ;
356+ expect ( ( ) => applyPatches ( baseState , produced [ 1 ] ) ) . toThrow ( ) ;
357357 // @ts -ignore
358358 expect ( applyPatches ( produced [ 0 ] , produced [ 2 ] ) ) . toEqual ( baseState ) ;
359359 }
@@ -372,7 +372,7 @@ test('#18 - set: assigning a non-draft with the same key - 2', () => {
372372 draft . c = new Set ( [ draft . c [ 0 ] , f ] ) ;
373373 } ) ;
374374 // @ts -ignore
375- expect ( ( ) => applyPatches ( baseState , produced [ 1 ] ) ) . toThrowError ( ) ;
375+ expect ( ( ) => applyPatches ( baseState , produced [ 1 ] ) ) . toThrow ( ) ;
376376 // @ts -ignore
377377 expect ( applyPatches ( produced [ 0 ] , produced [ 2 ] ) ) . toEqual ( baseState ) ;
378378 }
@@ -460,7 +460,7 @@ test('produce leaks proxy objects when symbols are present', () => {
460460 // @ts -ignore
461461 draft . child . count ++ ;
462462 } ) ;
463- } ) . toThrowError ( ) ;
463+ } ) . toThrow ( ) ;
464464 }
465465 {
466466 const Parent = Symbol ( ) ;
@@ -481,7 +481,7 @@ test('produce leaks proxy objects when symbols are present', () => {
481481 // @ts -ignore
482482 draft . child . count ++ ;
483483 } ) ;
484- } ) . not . toThrowError ( ) ;
484+ } ) . not . toThrow ( ) ;
485485 }
486486} ) ;
487487
@@ -494,7 +494,7 @@ test('error key setting in array', () => {
494494 // @ts -ignore
495495 draft [ key ] = 'new str' ;
496496 } ) ;
497- } ) . not . toThrowError ( ) ;
497+ } ) . not . toThrow ( ) ;
498498 }
499499 }
500500 {
0 commit comments