@@ -41,17 +41,17 @@ describe('BridgeEscrow', () => {
41
41
describe ( 'approveAll' , function ( ) {
42
42
it ( 'cannot be called by someone other than the governor' , async function ( ) {
43
43
const tx = bridgeEscrow . connect ( tokenReceiver . signer ) . approveAll ( spender . address )
44
- expect ( tx ) . to . be . revertedWith ( 'Caller must be Controller governor' )
44
+ await expect ( tx ) . revertedWith ( 'Caller must be Controller governor' )
45
45
} )
46
46
it ( 'allows a spender to transfer GRT held by the contract' , async function ( ) {
47
47
expect ( await grt . allowance ( bridgeEscrow . address , spender . address ) ) . eq ( 0 )
48
48
const tx = grt
49
49
. connect ( spender . signer )
50
50
. transferFrom ( bridgeEscrow . address , tokenReceiver . address , nTokens )
51
- expect ( tx ) . to . be . revertedWith ( 'ERC20: transfer amount exceeds allowance' )
51
+ await expect ( tx ) . revertedWith ( 'ERC20: transfer amount exceeds allowance' )
52
52
await bridgeEscrow . connect ( governor . signer ) . approveAll ( spender . address )
53
- expect (
54
- await grt
53
+ await expect (
54
+ grt
55
55
. connect ( spender . signer )
56
56
. transferFrom ( bridgeEscrow . address , tokenReceiver . address , nTokens ) ,
57
57
) . to . emit ( grt , 'Transfer' )
@@ -62,7 +62,7 @@ describe('BridgeEscrow', () => {
62
62
describe ( 'revokeAll' , function ( ) {
63
63
it ( 'cannot be called by someone other than the governor' , async function ( ) {
64
64
const tx = bridgeEscrow . connect ( tokenReceiver . signer ) . revokeAll ( spender . address )
65
- expect ( tx ) . to . be . revertedWith ( 'Caller must be Controller governor' )
65
+ await expect ( tx ) . revertedWith ( 'Caller must be Controller governor' )
66
66
} )
67
67
it ( "revokes a spender's permission to transfer GRT held by the contract" , async function ( ) {
68
68
await bridgeEscrow . connect ( governor . signer ) . approveAll ( spender . address )
@@ -71,7 +71,7 @@ describe('BridgeEscrow', () => {
71
71
const tx = grt
72
72
. connect ( spender . signer )
73
73
. transferFrom ( bridgeEscrow . address , tokenReceiver . address , BigNumber . from ( '1' ) )
74
- expect ( tx ) . to . be . revertedWith ( 'ERC20: transfer amount exceeds allowance' )
74
+ await expect ( tx ) . revertedWith ( 'ERC20: transfer amount exceeds allowance' )
75
75
} )
76
76
} )
77
77
} )
0 commit comments