diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-10 21:36:52 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-10 21:36:52 +0800 |
commit | d727bed6ab6fef90717a45845c544b409657e3c2 (patch) | |
tree | 9a232b7764d80726acf5f4dd91d19c0c06ae0439 /test | |
parent | 8b9d8ad1b625967fe264fe87e617af1089e1d0e9 (diff) | |
download | dexon-sol-tools-d727bed6ab6fef90717a45845c544b409657e3c2.tar dexon-sol-tools-d727bed6ab6fef90717a45845c544b409657e3c2.tar.gz dexon-sol-tools-d727bed6ab6fef90717a45845c544b409657e3c2.tar.bz2 dexon-sol-tools-d727bed6ab6fef90717a45845c544b409657e3c2.tar.lz dexon-sol-tools-d727bed6ab6fef90717a45845c544b409657e3c2.tar.xz dexon-sol-tools-d727bed6ab6fef90717a45845c544b409657e3c2.tar.zst dexon-sol-tools-d727bed6ab6fef90717a45845c544b409657e3c2.zip |
Prefix private vars with _
Diffstat (limited to 'test')
-rw-r--r-- | test/0x.js_test.ts | 12 | ||||
-rw-r--r-- | test/exchange_wrapper_test.ts | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts index 1349d6360..3a1f8514e 100644 --- a/test/0x.js_test.ts +++ b/test/0x.js_test.ts @@ -19,8 +19,8 @@ describe('ZeroEx library', () => { const web3 = web3Factory.create(); const zeroEx = new ZeroEx(web3); // Instantiate the contract instances with the current provider - await (zeroEx.exchange as any).getExchangeContractAsync(); - await (zeroEx.tokenRegistry as any).getTokenRegistryContractAsync(); + await (zeroEx.exchange as any)._getExchangeContractAsync(); + await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync(); expect((zeroEx.exchange as any).exchangeContractIfExists).to.not.be.undefined(); expect((zeroEx.tokenRegistry as any).tokenRegistryContractIfExists).to.not.be.undefined(); @@ -57,14 +57,14 @@ describe('ZeroEx library', () => { it('should return false if the data doesn\'t pertain to the signature & address', async () => { expect(ZeroEx.isValidSignature('0x0', signature, address)).to.be.false(); return expect( - (zeroEx.exchange as any).isValidSignatureUsingContractCallAsync('0x0', signature, address), + (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync('0x0', signature, address), ).to.become(false); }); it('should return false if the address doesn\'t pertain to the signature & data', async () => { const validUnrelatedAddress = '0x8b0292B11a196601eD2ce54B665CaFEca0347D42'; expect(ZeroEx.isValidSignature(dataHex, signature, validUnrelatedAddress)).to.be.false(); return expect( - (zeroEx.exchange as any).isValidSignatureUsingContractCallAsync(dataHex, signature, + (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, signature, validUnrelatedAddress), ).to.become(false); }); @@ -72,14 +72,14 @@ describe('ZeroEx library', () => { const wrongSignature = _.assign({}, signature, {v: 28}); expect(ZeroEx.isValidSignature(dataHex, wrongSignature, address)).to.be.false(); return expect( - (zeroEx.exchange as any).isValidSignatureUsingContractCallAsync(dataHex, wrongSignature, address), + (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, wrongSignature, address), ).to.become(false); }); it('should return true if the signature does pertain to the dataHex & address', async () => { const isValidSignatureLocal = ZeroEx.isValidSignature(dataHex, signature, address); expect(isValidSignatureLocal).to.be.true(); const isValidSignatureOnContract = await (zeroEx.exchange as any) - .isValidSignatureUsingContractCallAsync(dataHex, signature, address); + ._isValidSignatureUsingContractCallAsync(dataHex, signature, address); return expect(isValidSignatureOnContract).to.be.true(); }); }); diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 1b97d7b05..633fa3c5d 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -618,7 +618,7 @@ describe('ExchangeWrapper', () => { ); }); afterEach(async () => { - await (zeroEx.exchange as any).stopWatchingExchangeLogEventsAsync(); + await (zeroEx.exchange as any)._stopWatchingExchangeLogEventsAsync(); }); // Hack: Mocha does not allow a test to be both async and have a `done` callback // Since we need to await the receipt of the event in the `subscribeAsync` callback, @@ -705,7 +705,7 @@ describe('ExchangeWrapper', () => { ); const orderHash = await zeroEx.getOrderHashHexAsync(signedOrder); const orderHashFromContract = await (zeroEx.exchange as any) - .getOrderHashHexUsingContractCallAsync(signedOrder); + ._getOrderHashHexUsingContractCallAsync(signedOrder); expect(orderHash).to.equal(orderHashFromContract); }); }); |