aboutsummaryrefslogtreecommitdiffstats
path: root/test/exchange_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 23:35:17 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 23:35:17 +0800
commitbe13cf127c00c762d03c5eaf17a11c2775701530 (patch)
treecda26032d212f7c08c72965813e17de8ed1c03d4 /test/exchange_wrapper_test.ts
parent843ec2d4cf4bbc9061ba6dc5a09fc6d694c3083a (diff)
downloaddexon-sol-tools-be13cf127c00c762d03c5eaf17a11c2775701530.tar
dexon-sol-tools-be13cf127c00c762d03c5eaf17a11c2775701530.tar.gz
dexon-sol-tools-be13cf127c00c762d03c5eaf17a11c2775701530.tar.bz2
dexon-sol-tools-be13cf127c00c762d03c5eaf17a11c2775701530.tar.lz
dexon-sol-tools-be13cf127c00c762d03c5eaf17a11c2775701530.tar.xz
dexon-sol-tools-be13cf127c00c762d03c5eaf17a11c2775701530.tar.zst
dexon-sol-tools-be13cf127c00c762d03c5eaf17a11c2775701530.zip
Refactor getOrderHash to accept order as an object
Diffstat (limited to 'test/exchange_wrapper_test.ts')
-rw-r--r--test/exchange_wrapper_test.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index e00edefbe..355a5d01b 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -4,9 +4,8 @@ import chaiAsPromised = require('chai-as-promised');
import {web3Factory} from './utils/web3_factory';
import {ZeroEx} from '../src/0x.js';
import {BlockchainLifecycle} from './utils/blockchain_lifecycle';
-import * as OrderJSON from './fixtures/orders/5_MLN_for_42_GLM.json';
import * as BigNumber from 'bignumber.js';
-import {signedOrderFromJSON} from './utils/order';
+import {createSignedOrder} from './utils/order';
const expect = chai.expect;
chai.use(chaiAsPromised);
@@ -94,8 +93,8 @@ describe('ExchangeWrapper', () => {
expect(isValid).to.be.true;
});
});
- describe('#fillOrderAsync', () => {
- const signedOrder = signedOrderFromJSON(OrderJSON);
+ describe('#fillOrderAsync', async () => {
+ const signedOrder = await createSignedOrder(zeroEx);
it('should throw when the fill amount is zero', async () => {
const fillAmount = new BigNumber(0);
expect(zeroEx.exchange.fillOrderAsync(signedOrder, fillAmount))