diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-06 14:03:14 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-06 14:03:14 +0800 |
commit | 24454938e51e40ae74809f15bd1f612c69c218ec (patch) | |
tree | 706a1a738d3e0a172c62343c0dfb5bad39163d9f /packages/0x.js/test/exchange_wrapper_test.ts | |
parent | 89a72ebf0dbff606d511ae51bfee7ffc0a5df18f (diff) | |
download | dexon-0x-contracts-24454938e51e40ae74809f15bd1f612c69c218ec.tar.gz dexon-0x-contracts-24454938e51e40ae74809f15bd1f612c69c218ec.tar.zst dexon-0x-contracts-24454938e51e40ae74809f15bd1f612c69c218ec.zip |
Move away from using web3 directly in 0x.js tests
Diffstat (limited to 'packages/0x.js/test/exchange_wrapper_test.ts')
-rw-r--r-- | packages/0x.js/test/exchange_wrapper_test.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/0x.js/test/exchange_wrapper_test.ts b/packages/0x.js/test/exchange_wrapper_test.ts index ba401d952..addfa6f91 100644 --- a/packages/0x.js/test/exchange_wrapper_test.ts +++ b/packages/0x.js/test/exchange_wrapper_test.ts @@ -4,7 +4,6 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; -import * as Web3 from 'web3'; import { BlockRange, @@ -26,7 +25,7 @@ import { constants } from './utils/constants'; import { FillScenarios } from './utils/fill_scenarios'; import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { TokenUtils } from './utils/token_utils'; -import { web3, web3Wrapper } from './utils/web3_wrapper'; +import { provider, web3Wrapper } from './utils/web3_wrapper'; chaiSetup.configure(); const expect = chai.expect; @@ -46,7 +45,7 @@ describe('ExchangeWrapper', () => { networkId: constants.TESTRPC_NETWORK_ID, }; before(async () => { - zeroEx = new ZeroEx(web3.currentProvider, config); + zeroEx = new ZeroEx(provider, config); exchangeContractAddress = zeroEx.exchange.getContractAddress(); userAddresses = await zeroEx.getAvailableAddressesAsync(); tokens = await zeroEx.tokenRegistry.getTokensAsync(); @@ -977,7 +976,7 @@ describe('ExchangeWrapper', () => { ); zeroEx.exchange.subscribe(ExchangeEvents.LogFill, indexFilterValues, callbackNeverToBeCalled); - const newProvider = web3.currentProvider; + const newProvider = provider; zeroEx.setProvider(newProvider, constants.TESTRPC_NETWORK_ID); const callback = reportNodeCallbackErrors(done)( |