From 0f3f557e0b535f9ca94af9345be118e03e37ed70 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 6 Jul 2017 15:42:00 -0700 Subject: Fix a typo in a filename --- test/web3_trapper_test.ts | 29 ----------------------------- test/web3_wrapper_test.ts | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 29 deletions(-) delete mode 100644 test/web3_trapper_test.ts create mode 100644 test/web3_wrapper_test.ts (limited to 'test') diff --git a/test/web3_trapper_test.ts b/test/web3_trapper_test.ts deleted file mode 100644 index 1989bd4bc..000000000 --- a/test/web3_trapper_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 networkId = 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 networkId = 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(); - }); - }); -}); diff --git a/test/web3_wrapper_test.ts b/test/web3_wrapper_test.ts new file mode 100644 index 000000000..1989bd4bc --- /dev/null +++ b/test/web3_wrapper_test.ts @@ -0,0 +1,29 @@ +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 networkId = 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 networkId = 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(); + }); + }); +}); -- cgit v1.2.3