aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/web3_wrapper_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/test/web3_wrapper_test.ts')
-rw-r--r--packages/0x.js/test/web3_wrapper_test.ts7
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);