aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/0x.js_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-22 05:58:41 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-24 05:13:36 +0800
commit311d42626a8eb6c07e4746172b8d868920e37e6c (patch)
treef3bdfa05fb5066632bd86d2277bf4d6a10e47d70 /packages/0x.js/test/0x.js_test.ts
parentcbf35de4c11d5f2b538d4e8f1b98ae3d76f137c9 (diff)
downloaddexon-sol-tools-311d42626a8eb6c07e4746172b8d868920e37e6c.tar
dexon-sol-tools-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.gz
dexon-sol-tools-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.bz2
dexon-sol-tools-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.lz
dexon-sol-tools-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.xz
dexon-sol-tools-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.zst
dexon-sol-tools-311d42626a8eb6c07e4746172b8d868920e37e6c.zip
Adjust the tests
Diffstat (limited to 'packages/0x.js/test/0x.js_test.ts')
-rw-r--r--packages/0x.js/test/0x.js_test.ts26
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);
});