@@ -233,7 +233,7 @@ describe(`Transactions`, () => {
233
233
} )
234
234
it ( `commit() should throw errors when mutation function fails` , async ( ) => {
235
235
const tx = createTransaction ( {
236
- mutationFn : async ( ) => {
236
+ mutationFn : ( ) => {
237
237
throw new Error ( `API failed` )
238
238
} ,
239
239
autoCommit : false ,
@@ -269,7 +269,7 @@ describe(`Transactions`, () => {
269
269
it ( `commit() and isPersisted.promise should reject with the same error instance` , async ( ) => {
270
270
const originalError = new Error ( `Original API error` )
271
271
const tx = createTransaction ( {
272
- mutationFn : async ( ) => {
272
+ mutationFn : ( ) => {
273
273
throw originalError
274
274
} ,
275
275
autoCommit : false ,
@@ -315,7 +315,7 @@ describe(`Transactions`, () => {
315
315
316
316
it ( `should handle non-Error throwables (strings)` , async ( ) => {
317
317
const tx = createTransaction ( {
318
- mutationFn : async ( ) => {
318
+ mutationFn : ( ) => {
319
319
throw `string error`
320
320
} ,
321
321
autoCommit : false ,
@@ -355,7 +355,7 @@ describe(`Transactions`, () => {
355
355
356
356
it ( `should handle non-Error throwables (numbers, objects)` , async ( ) => {
357
357
const tx = createTransaction ( {
358
- mutationFn : async ( ) => {
358
+ mutationFn : ( ) => {
359
359
throw 42
360
360
} ,
361
361
autoCommit : false ,
@@ -371,7 +371,7 @@ describe(`Transactions`, () => {
371
371
}
372
372
373
373
const tx2 = createTransaction ( {
374
- mutationFn : async ( ) => {
374
+ mutationFn : ( ) => {
375
375
throw { code : `ERR_FAILED` , details : `Something went wrong` }
376
376
} ,
377
377
autoCommit : false ,
@@ -405,7 +405,7 @@ describe(`Transactions`, () => {
405
405
406
406
it ( `should throw TransactionNotPendingCommitError when commit() is called on failed transaction` , async ( ) => {
407
407
const tx = createTransaction ( {
408
- mutationFn : async ( ) => {
408
+ mutationFn : ( ) => {
409
409
throw new Error ( `Failed` )
410
410
} ,
411
411
autoCommit : false ,
@@ -440,7 +440,7 @@ describe(`Transactions`, () => {
440
440
it ( `should handle cascading rollbacks with proper error propagation` , async ( ) => {
441
441
const originalError = new Error ( `Primary transaction failed` )
442
442
const tx1 = createTransaction ( {
443
- mutationFn : async ( ) => {
443
+ mutationFn : ( ) => {
444
444
throw originalError
445
445
} ,
446
446
autoCommit : false ,
0 commit comments