aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 22:19:35 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 22:19:35 +0800
commit90caa189ccdf4f17f3c60d0872bb6efd9ab646f1 (patch)
treecb3668f9833a78f1acfc2472db622c571b91ea24
parenta4e5ec6c08596d3d59f07aa237887bf27b198e67 (diff)
downloaddexon-sol-tools-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar
dexon-sol-tools-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.gz
dexon-sol-tools-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.bz2
dexon-sol-tools-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.lz
dexon-sol-tools-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.xz
dexon-sol-tools-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.tar.zst
dexon-sol-tools-90caa189ccdf4f17f3c60d0872bb6efd9ab646f1.zip
Add first passing test
-rw-r--r--test/exchange_wrapper_test.ts9
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');
});
});
});