diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-22 02:21:49 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-22 02:21:49 +0800 |
commit | 351b7557b65e4cdef2177585d52021ee5a0f3e42 (patch) | |
tree | 22c09c3e9c1ee8f2aebec71c7e1467a6442d9569 /packages/0x.js/test | |
parent | 4dc1962f9ec2c537b7944246842d934c3aee186d (diff) | |
download | dexon-0x-contracts-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar dexon-0x-contracts-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.gz dexon-0x-contracts-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.bz2 dexon-0x-contracts-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.lz dexon-0x-contracts-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.xz dexon-0x-contracts-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.zst dexon-0x-contracts-351b7557b65e4cdef2177585d52021ee5a0f3e42.zip |
Fix tests
Diffstat (limited to 'packages/0x.js/test')
-rw-r--r-- | packages/0x.js/test/expiration_watcher_test.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/0x.js/test/expiration_watcher_test.ts b/packages/0x.js/test/expiration_watcher_test.ts index 19c08a811..0d5ebb909 100644 --- a/packages/0x.js/test/expiration_watcher_test.ts +++ b/packages/0x.js/test/expiration_watcher_test.ts @@ -72,10 +72,10 @@ describe('ExpirationWatcher', () => { expirationUnixTimestampSec, ); const orderHash = ZeroEx.getOrderHashHex(signedOrder); - expirationWatcher.addOrder(orderHash, signedOrder.expirationUnixTimestampSec); + expirationWatcher.addOrder(orderHash, signedOrder.expirationUnixTimestampSec.times(1000)); const callbackAsync = reportCallbackErrors(done)(async (hash: string) => { expect(hash).to.be.equal(orderHash); - expect(utils.getCurrentUnixTimestampSec()).to.be.bignumber.above(expirationUnixTimestampSec); + expect(utils.getCurrentUnixTimestampSec()).to.be.bignumber.gte(expirationUnixTimestampSec); done(); }); expirationWatcher.subscribe(callbackAsync); @@ -91,7 +91,7 @@ describe('ExpirationWatcher', () => { expirationUnixTimestampSec, ); const orderHash = ZeroEx.getOrderHashHex(signedOrder); - expirationWatcher.addOrder(orderHash, signedOrder.expirationUnixTimestampSec); + expirationWatcher.addOrder(orderHash, signedOrder.expirationUnixTimestampSec.times(1000)); const callbackAsync = reportCallbackErrors(done)(async (hash: string) => { done(new Error('Emitted expiration went before the order actually expired')); }); @@ -117,8 +117,8 @@ describe('ExpirationWatcher', () => { ); const orderHash1 = ZeroEx.getOrderHashHex(signedOrder1); const orderHash2 = ZeroEx.getOrderHashHex(signedOrder2); - expirationWatcher.addOrder(orderHash2, signedOrder2.expirationUnixTimestampSec); - expirationWatcher.addOrder(orderHash1, signedOrder1.expirationUnixTimestampSec); + expirationWatcher.addOrder(orderHash2, signedOrder2.expirationUnixTimestampSec.times(1000)); + expirationWatcher.addOrder(orderHash1, signedOrder1.expirationUnixTimestampSec.times(1000)); const expirationOrder = [orderHash1, orderHash2]; const callbackAsync = reportCallbackErrors(done)(async (hash: string) => { const orderHash = expirationOrder.shift(); |