diff --git a/src/hooks/L1/useWriteDepositERC20.test.ts b/src/hooks/L1/useWriteDepositERC20.test.ts index 4202d9b..8f5d650 100644 --- a/src/hooks/L1/useWriteDepositERC20.test.ts +++ b/src/hooks/L1/useWriteDepositERC20.test.ts @@ -23,8 +23,10 @@ test('useWriteDepositERC20', async () => { }) await waitFor(() => { - expect(result.current.error).toBeNull() - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + expect(result.current.isSuccess).toBeTruthy(), + ]) }) expect(result.current).toMatchInlineSnapshot(` diff --git a/src/hooks/L1/useWriteDepositETH.test.ts b/src/hooks/L1/useWriteDepositETH.test.ts index 832e8ca..9806c36 100644 --- a/src/hooks/L1/useWriteDepositETH.test.ts +++ b/src/hooks/L1/useWriteDepositETH.test.ts @@ -18,9 +18,10 @@ test('useWriteDepositETH', async () => { // since we didn't use the async wait for it to succeed await waitFor(() => { - // check for error first so if one happens we can see it in the test failure - expect(result.current.error).toBeNull() - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + expect(result.current.isSuccess).toBeTruthy(), + ]) }) // now assert the result is what we expect diff --git a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts index 6eb1069..c6ae1f1 100644 --- a/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts +++ b/src/hooks/L1/useWriteFinalizeWithdrawalTransaction.test.ts @@ -18,8 +18,10 @@ test('useWriteFinalizeWithdrawalTransaction', async () => { }) await waitFor(() => { - expect(result.current.error).toBeNull() - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + expect(result.current.isSuccess).toBeTruthy(), + ]) }) expect(result.current).toMatchInlineSnapshot(` diff --git a/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts b/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts index 2abc4e6..c0d4956 100644 --- a/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts +++ b/src/hooks/L1/useWriteProveWithdrawalTransaction.test.ts @@ -18,9 +18,11 @@ test('useWriteProveWithdrawalTransaction', async () => { }) await waitFor(() => { - expect(result.current.error).toBeNull() - // We're only checking that we're able to successfully call the contract. The snapshot - // will continue to change as blocks get procuded, and this check is sufficient. - expect(result.current.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.error).toBeNull(), + // We're only checking that we're able to successfully call the contract. The snapshot + // will continue to change as blocks get procuded, and this check is sufficient. + expect(result.current.isSuccess).toBeTruthy(), + ]) }) }, { retry: 3 }) diff --git a/src/hooks/L2/useWriteWithdrawERC20.test.ts b/src/hooks/L2/useWriteWithdrawERC20.test.ts index afce93b..97ae18f 100644 --- a/src/hooks/L2/useWriteWithdrawERC20.test.ts +++ b/src/hooks/L2/useWriteWithdrawERC20.test.ts @@ -28,8 +28,10 @@ test('useWriteWithdrawERC20', async () => { }) await waitFor(() => { - expect(result.current.useWriteWithdrawERC20.error).toBeNull() - expect(result.current.useWriteWithdrawERC20.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.useWriteWithdrawERC20.error).toBeNull(), + expect(result.current.useWriteWithdrawERC20.isSuccess).toBeTruthy(), + ]) }) expect(result.current.useWriteWithdrawERC20).toMatchInlineSnapshot(` diff --git a/src/hooks/L2/useWriteWithdrawETH.test.ts b/src/hooks/L2/useWriteWithdrawETH.test.ts index 8807d50..4e97bb8 100644 --- a/src/hooks/L2/useWriteWithdrawETH.test.ts +++ b/src/hooks/L2/useWriteWithdrawETH.test.ts @@ -27,8 +27,10 @@ test('useWriteWithdrawETH', async () => { }) await waitFor(() => { - expect(result.current.useWriteWithdrawETH.error).toBeNull() - expect(result.current.useWriteWithdrawETH.isSuccess).toBeTruthy() + Promise.all([ + expect(result.current.useWriteWithdrawETH.error).toBeNull(), + expect(result.current.useWriteWithdrawETH.isSuccess).toBeTruthy(), + ]) }) expect(result.current.useWriteWithdrawETH).toMatchInlineSnapshot(`