aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-22 02:21:49 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-22 02:21:49 +0800
commit351b7557b65e4cdef2177585d52021ee5a0f3e42 (patch)
tree22c09c3e9c1ee8f2aebec71c7e1467a6442d9569 /packages/0x.js/test
parent4dc1962f9ec2c537b7944246842d934c3aee186d (diff)
downloaddexon-sol-tools-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar
dexon-sol-tools-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.gz
dexon-sol-tools-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.bz2
dexon-sol-tools-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.lz
dexon-sol-tools-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.xz
dexon-sol-tools-351b7557b65e4cdef2177585d52021ee5a0f3e42.tar.zst
dexon-sol-tools-351b7557b65e4cdef2177585d52021ee5a0f3e42.zip
Fix tests
Diffstat (limited to 'packages/0x.js/test')
-rw-r--r--packages/0x.js/test/expiration_watcher_test.ts10
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();