aboutsummaryrefslogtreecommitdiffstats
path: root/test/web3_wrapper_test.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-13 11:17:18 +0800
committerFabio Berger <me@fabioberger.com>2017-11-13 11:17:18 +0800
commitc4ee2d73865a1444c079b9e2836b7630a0adf03e (patch)
treeb9c7794e7022fb189675d914f5fe58dcabd67dec /test/web3_wrapper_test.ts
parenta74ec0effa818a86233fe64cb0dad2c61bbb4bb6 (diff)
downloaddexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.gz
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.bz2
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.lz
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.xz
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.tar.zst
dexon-sol-tools-c4ee2d73865a1444c079b9e2836b7630a0adf03e.zip
Switch over to Lerna + Yarn Workspaces setup for a mono-repo approach
Diffstat (limited to 'test/web3_wrapper_test.ts')
-rw-r--r--test/web3_wrapper_test.ts29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/web3_wrapper_test.ts b/test/web3_wrapper_test.ts
deleted file mode 100644
index d1c2e8e89..000000000
--- a/test/web3_wrapper_test.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as chai from 'chai';
-import {web3Factory} from './utils/web3_factory';
-import {ZeroEx} from '../src/';
-import {Web3Wrapper} from '../src/web3_wrapper';
-import {constants} from './utils/constants';
-
-chai.config.includeStack = true;
-const expect = chai.expect;
-
-describe('Web3Wrapper', () => {
- const web3Provider = web3Factory.create().currentProvider;
- describe('#getNetworkIdIfExistsAsync', () => {
- it('caches network id requests', async () => {
- const web3Wrapper = (new ZeroEx(web3Provider) 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;
- 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);
- const newProvider = web3Factory.create().currentProvider;
- web3Wrapper.setProvider(newProvider);
- expect((web3Wrapper as any).networkIdIfExists).to.be.undefined();
- });
- });
-});