diff options
Diffstat (limited to 'packages/0x.js/test/0x.js_test.ts')
-rw-r--r-- | packages/0x.js/test/0x.js_test.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index 6e7b53b6f..94387e740 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -16,10 +16,10 @@ const expect = chai.expect; describe('ZeroEx library', () => { const web3 = web3Factory.create(); - const networkId = 50; - const zeroEx = new ZeroEx(web3.currentProvider, { - networkId, - }); + const config = { + networkId: constants.TESTRPC_NETWORK_ID, + }; + const zeroEx = new ZeroEx(web3.currentProvider, config); describe('#setProvider', () => { it('overrides provider in nested web3s and invalidates contractInstances', async () => { // Instantiate the contract instances with the current provider @@ -235,29 +235,29 @@ describe('ZeroEx library', () => { }); describe('#config', () => { it('allows to specify exchange contract address', async () => { - const config = { + const zeroExConfig = { exchangeContractAddress: ZeroEx.NULL_ADDRESS, - networkId, + networkId: constants.TESTRPC_NETWORK_ID, }; - const zeroExWithWrongExchangeAddress = new ZeroEx(web3.currentProvider, config); + const zeroExWithWrongExchangeAddress = new ZeroEx(web3.currentProvider, zeroExConfig); return expect(zeroExWithWrongExchangeAddress.exchange.getContractAddressAsync()) .to.be.rejectedWith(ZeroExError.ContractDoesNotExist); }); it('allows to specify ether token contract address', async () => { - const config = { + const zeroExConfig = { etherTokenContractAddress: ZeroEx.NULL_ADDRESS, - networkId, + networkId: constants.TESTRPC_NETWORK_ID, }; - const zeroExWithWrongEtherTokenAddress = new ZeroEx(web3.currentProvider, config); + const zeroExWithWrongEtherTokenAddress = new ZeroEx(web3.currentProvider, zeroExConfig); return expect(zeroExWithWrongEtherTokenAddress.etherToken.getContractAddressAsync()) .to.be.rejectedWith(ZeroExError.ContractDoesNotExist); }); it('allows to specify token registry token contract address', async () => { - const config = { + const zeroExConfig = { tokenRegistryContractAddress: ZeroEx.NULL_ADDRESS, - networkId, + networkId: constants.TESTRPC_NETWORK_ID, }; - const zeroExWithWrongTokenRegistryAddress = new ZeroEx(web3.currentProvider, config); + const zeroExWithWrongTokenRegistryAddress = new ZeroEx(web3.currentProvider, zeroExConfig); return expect(zeroExWithWrongTokenRegistryAddress.tokenRegistry.getContractAddressAsync()) .to.be.rejectedWith(ZeroExError.ContractDoesNotExist); }); |