diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-22 05:58:41 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-24 05:13:36 +0800 |
commit | 311d42626a8eb6c07e4746172b8d868920e37e6c (patch) | |
tree | f3bdfa05fb5066632bd86d2277bf4d6a10e47d70 /packages/0x.js/test/web3_wrapper_test.ts | |
parent | cbf35de4c11d5f2b538d4e8f1b98ae3d76f137c9 (diff) | |
download | dexon-0x-contracts-311d42626a8eb6c07e4746172b8d868920e37e6c.tar dexon-0x-contracts-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.gz dexon-0x-contracts-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.bz2 dexon-0x-contracts-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.lz dexon-0x-contracts-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.xz dexon-0x-contracts-311d42626a8eb6c07e4746172b8d868920e37e6c.tar.zst dexon-0x-contracts-311d42626a8eb6c07e4746172b8d868920e37e6c.zip |
Adjust the tests
Diffstat (limited to 'packages/0x.js/test/web3_wrapper_test.ts')
-rw-r--r-- | packages/0x.js/test/web3_wrapper_test.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/0x.js/test/web3_wrapper_test.ts b/packages/0x.js/test/web3_wrapper_test.ts index d1c2e8e89..ccbf336ab 100644 --- a/packages/0x.js/test/web3_wrapper_test.ts +++ b/packages/0x.js/test/web3_wrapper_test.ts @@ -9,15 +9,18 @@ const expect = chai.expect; describe('Web3Wrapper', () => { const web3Provider = web3Factory.create().currentProvider; + const config = { + networkId: constants.TESTRPC_NETWORK_ID, + }; describe('#getNetworkIdIfExistsAsync', () => { it('caches network id requests', async () => { - const web3Wrapper = (new ZeroEx(web3Provider) as any)._web3Wrapper as Web3Wrapper; + const web3Wrapper = (new ZeroEx(web3Provider, config) as any)._web3Wrapper as Web3Wrapper; expect((web3Wrapper as any).networkIdIfExists).to.be.undefined(); const networkIdIfExists = await web3Wrapper.getNetworkIdIfExistsAsync(); expect((web3Wrapper as any).networkIdIfExists).to.be.equal(constants.TESTRPC_NETWORK_ID); }); it('invalidates network id cache on setProvider call', async () => { - const web3Wrapper = (new ZeroEx(web3Provider) as any)._web3Wrapper as Web3Wrapper; + const web3Wrapper = (new ZeroEx(web3Provider, config) as any)._web3Wrapper as Web3Wrapper; expect((web3Wrapper as any).networkIdIfExists).to.be.undefined(); const networkIdIfExists = await web3Wrapper.getNetworkIdIfExistsAsync(); expect((web3Wrapper as any).networkIdIfExists).to.be.equal(constants.TESTRPC_NETWORK_ID); |