@@ -46,9 +46,8 @@ describe('UniswapV2Pair', () => {
46
46
await expect ( pair . mint ( wallet . address , overrides ) )
47
47
. to . emit ( pair , 'Transfer' )
48
48
. withArgs ( AddressZero , AddressZero , MINIMUM_LIQUIDITY )
49
- // commented out because of this bug: https://github.com/EthWorks/Waffle/issues/100
50
- // .to.emit(pair, 'Transfer')
51
- // .withArgs(AddressZero, wallet.address, expectedLiquidity.sub(MINIMUM_LIQUIDITY))
49
+ . to . emit ( pair , 'Transfer' )
50
+ . withArgs ( AddressZero , wallet . address , expectedLiquidity . sub ( MINIMUM_LIQUIDITY ) )
52
51
. to . emit ( pair , 'Sync' )
53
52
. withArgs ( token0Amount , token1Amount )
54
53
. to . emit ( pair , 'Mint' )
@@ -176,8 +175,9 @@ describe('UniswapV2Pair', () => {
176
175
const expectedOutputAmount = bigNumberify ( '453305446940074565' )
177
176
await token1 . transfer ( pair . address , swapAmount )
178
177
await mineBlock ( provider , ( await provider . getBlock ( 'latest' ) ) . timestamp + 1 )
179
- const gasCost = await pair . estimate . swap ( expectedOutputAmount , 0 , wallet . address , '0x' , overrides )
180
- expect ( gasCost ) . to . eq ( 79378 )
178
+ const tx = await pair . swap ( expectedOutputAmount , 0 , wallet . address , '0x' , overrides )
179
+ const receipt = await tx . wait ( )
180
+ expect ( receipt . gasUsed ) . to . eq ( 73462 )
181
181
} )
182
182
183
183
it ( 'burn' , async ( ) => {
@@ -190,11 +190,10 @@ describe('UniswapV2Pair', () => {
190
190
await expect ( pair . burn ( wallet . address , overrides ) )
191
191
. to . emit ( pair , 'Transfer' )
192
192
. withArgs ( pair . address , AddressZero , expectedLiquidity . sub ( MINIMUM_LIQUIDITY ) )
193
- // commented out because of this bug: https://github.com/EthWorks/Waffle/issues/100
194
- // .to.emit(token0, 'Transfer')
195
- // .withArgs(pair.address, wallet.address, token0Amount.sub(1000))
196
- // .to.emit(token1, 'Transfer')
197
- // .withArgs(pair.address, wallet.address, token1Amount.sub(1000))
193
+ . to . emit ( token0 , 'Transfer' )
194
+ . withArgs ( pair . address , wallet . address , token0Amount . sub ( 1000 ) )
195
+ . to . emit ( token1 , 'Transfer' )
196
+ . withArgs ( pair . address , wallet . address , token1Amount . sub ( 1000 ) )
198
197
. to . emit ( pair , 'Sync' )
199
198
. withArgs ( 1000 , 1000 )
200
199
. to . emit ( pair , 'Burn' )
0 commit comments