diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-05-30 22:19:35 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-05-30 22:19:35 +0800 |
commit | 90caa189ccdf4f17f3c60d0872bb6efd9ab646f1 (patch) | |
tree | cb3668f9833a78f1acfc2472db622c571b91ea24 /test/exchange_wrapper_test.ts | |
parent | a4e5ec6c08596d3d59f07aa237887bf27b198e67 (diff) | |
download | dexon-0x-contracts-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar dexon-0x-contracts-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.gz dexon-0x-contracts-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.bz2 dexon-0x-contracts-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.lz dexon-0x-contracts-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.xz dexon-0x-contracts-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.zst dexon-0x-contracts-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.zip |
Add first passing test
Diffstat (limited to 'test/exchange_wrapper_test.ts')
-rw-r--r-- | test/exchange_wrapper_test.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index b97a62100..e00edefbe 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -4,7 +4,7 @@ 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_MKR_for_42_MLN.json'; +import * as OrderJSON from './fixtures/orders/5_MLN_for_42_GLM.json'; import * as BigNumber from 'bignumber.js'; import {signedOrderFromJSON} from './utils/order'; @@ -95,10 +95,11 @@ describe('ExchangeWrapper', () => { }); }); describe('#fillOrderAsync', () => { - const fillAmount = new BigNumber(1); const signedOrder = signedOrderFromJSON(OrderJSON); - it('fillsOrder', async () => { - // const orderFillResponse = await zeroEx.exchange.fillOrderAsync(signedOrder, fillAmount); + it('should throw when the fill amount is zero', async () => { + const fillAmount = new BigNumber(0); + expect(zeroEx.exchange.fillOrderAsync(signedOrder, fillAmount)) + .to.be.rejectedWith('This order has already been filled or cancelled'); }); }); }); |