aboutsummaryrefslogtreecommitdiffstats
path: root/test/0x.js_test.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-03 03:18:02 +0800
committerGitHub <noreply@github.com>2017-06-03 03:18:02 +0800
commit3d75a502359b54226311215182d388615dbd8498 (patch)
treeeba084371931a9bd7534fd9c2dfadee8e18e64fc /test/0x.js_test.ts
parent88815e5b4514e4953cc150241340e0b53dadc198 (diff)
parent2e5e8c8987c681ffd0dd1535cb26874a39b8abec (diff)
downloaddexon-sol-tools-3d75a502359b54226311215182d388615dbd8498.tar
dexon-sol-tools-3d75a502359b54226311215182d388615dbd8498.tar.gz
dexon-sol-tools-3d75a502359b54226311215182d388615dbd8498.tar.bz2
dexon-sol-tools-3d75a502359b54226311215182d388615dbd8498.tar.lz
dexon-sol-tools-3d75a502359b54226311215182d388615dbd8498.tar.xz
dexon-sol-tools-3d75a502359b54226311215182d388615dbd8498.tar.zst
dexon-sol-tools-3d75a502359b54226311215182d388615dbd8498.zip
Merge pull request #32 from 0xProject/addEventSubscriptions
Implement zeroEx.exchange.subscribeAsync
Diffstat (limited to 'test/0x.js_test.ts')
-rw-r--r--test/0x.js_test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts
index 9196d3df3..8686b42eb 100644
--- a/test/0x.js_test.ts
+++ b/test/0x.js_test.ts
@@ -8,7 +8,7 @@ import * as Sinon from 'sinon';
import {ZeroEx} from '../src/0x.js';
import {constants} from './utils/constants';
import {web3Factory} from './utils/web3_factory';
-import {Order} from '../src/types';
+import {Order, DoneCallback} from '../src/types';
chai.config.includeStack = true;
chai.use(ChaiBigNumber());
@@ -17,7 +17,7 @@ const expect = chai.expect;
describe('ZeroEx library', () => {
describe('#setProvider', () => {
- it('overrides the provider in the nested web3 instance and invalidates contractInstances', async () => {
+ it('overrides provider in nested web3s and invalidates contractInstances', async () => {
const web3 = web3Factory.create();
const zeroEx = new ZeroEx(web3);
// Instantiate the contract instances with the current provider
@@ -29,7 +29,7 @@ describe('ZeroEx library', () => {
const newProvider = web3Factory.getRpcProvider();
// Add property to newProvider so that we can differentiate it from old provider
(newProvider as any).zeroExTestId = 1;
- zeroEx.setProvider(newProvider);
+ await zeroEx.setProviderAsync(newProvider);
// Check that contractInstances with old provider are removed after provider update
expect((zeroEx.exchange as any).exchangeContractIfExists).to.be.undefined();