Skip to content

Commit 8d5a6f5

Browse files
committed
Fixes test consistency
1 parent 0e8e9b7 commit 8d5a6f5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/v4/order.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ethers } from 'ethers';
1+
import { BigNumber, ethers } from 'ethers';
22
import { NftSwapV4 } from '../../src/sdk/v4/NftSwapV4';
33

44
import {
@@ -70,6 +70,9 @@ describe('NFTSwapV4', () => {
7070
);
7171

7272
const v4Erc721SignedOrder = await nftSwapperMaker.signOrder(v4Erc721Order);
73-
expect(v4Erc721SignedOrder.expiry.toString()).toEqual('1897016400');
73+
74+
const expiryBn = BigNumber.from(v4Erc721SignedOrder.expiry);
75+
// Depending on where this test is run it'll vary by a few hours. This assets on a valid range (24hrs)
76+
expect(expiryBn.sub('1897016400').abs().toNumber()).toBeLessThan(24_000);
7477
});
7578
});

0 commit comments

Comments
 (0)