diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-06 20:10:36 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-06 20:10:36 +0800 |
commit | 80bbfc3f0ff6d000e628d6db4baddae94c4911a0 (patch) | |
tree | 7f1a00fd2b74affa7e8a7ce1cf2e66a98c087138 | |
parent | abd6fbfa648a540342d9c183fc8f5b36248b6055 (diff) | |
download | dexon-sol-tools-80bbfc3f0ff6d000e628d6db4baddae94c4911a0.tar dexon-sol-tools-80bbfc3f0ff6d000e628d6db4baddae94c4911a0.tar.gz dexon-sol-tools-80bbfc3f0ff6d000e628d6db4baddae94c4911a0.tar.bz2 dexon-sol-tools-80bbfc3f0ff6d000e628d6db4baddae94c4911a0.tar.lz dexon-sol-tools-80bbfc3f0ff6d000e628d6db4baddae94c4911a0.tar.xz dexon-sol-tools-80bbfc3f0ff6d000e628d6db4baddae94c4911a0.tar.zst dexon-sol-tools-80bbfc3f0ff6d000e628d6db4baddae94c4911a0.zip |
Last round of renamings
-rw-r--r-- | test/0x.js_test.ts | 12 | ||||
-rw-r--r-- | test/assert_test.ts | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts index edc2a3493..43c50ef34 100644 --- a/test/0x.js_test.ts +++ b/test/0x.js_test.ts @@ -191,12 +191,12 @@ describe('ZeroEx library', () => { }); describe('#signOrderHashAsync', () => { let stubs: Sinon.SinonStub[] = []; - let makerAccount: string; + let makerAddress: string; const web3 = web3Factory.create(); const zeroEx = new ZeroEx(web3); before(async () => { - const availableAccounts = await zeroEx.getAvailableAddressesAsync(); - makerAccount = availableAccounts[0]; + const availableAddreses = await zeroEx.getAvailableAddressesAsync(); + makerAddress = availableAddreses[0]; }); afterEach(() => { // clean up any stubs after the test has completed @@ -210,7 +210,7 @@ describe('ZeroEx library', () => { r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33', s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254', }; - const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAccount); + const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAddress); expect(ecSignature).to.deep.equal(expectedECSignature); }); it ('should return the correct ECSignature on Parity > V1.6.6', async () => { @@ -231,7 +231,7 @@ describe('ZeroEx library', () => { Sinon.stub(ZeroEx, 'isValidSignature').returns(true), ]; - const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAccount); + const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAddress); expect(ecSignature).to.deep.equal(expectedECSignature); }); it ('should return the correct ECSignature on Parity < V1.6.6', async () => { @@ -252,7 +252,7 @@ describe('ZeroEx library', () => { Sinon.stub(ZeroEx, 'isValidSignature').returns(true), ]; - const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAccount); + const ecSignature = await zeroEx.signOrderHashAsync(orderHash, makerAddress); expect(ecSignature).to.deep.equal(expectedECSignature); }); }); diff --git a/test/assert_test.ts b/test/assert_test.ts index 147c9832f..ff15d6cf6 100644 --- a/test/assert_test.ts +++ b/test/assert_test.ts @@ -9,24 +9,24 @@ const expect = chai.expect; describe('Assertion library', () => { const web3 = web3Factory.create(); const zeroEx = new ZeroEx(web3); - describe('#isSenderAccountHexAsync', () => { + describe('#isSenderAddressHexAsync', () => { it('throws when address is invalid', async () => { const address = '0xdeadbeef'; - const varName = 'account'; + const varName = 'address'; return expect(assert.isSenderAddressHexAsync(varName, address, (zeroEx as any).web3Wrapper)) .to.be.rejectedWith(`Expected ${varName} to be of type ETHAddressHex, encountered: ${address}`); }); it('throws when address is unavailable', async () => { const validUnrelatedAddress = '0x8b0292b11a196601eddce54b665cafeca0347d42'; - const varName = 'account'; + const varName = 'address'; return expect(assert.isSenderAddressHexAsync(varName, validUnrelatedAddress, (zeroEx as any).web3Wrapper)) .to.be.rejectedWith(`Specified ${varName} ${validUnrelatedAddress} \ isn't available through the supplied web3 instance`); }); - it('doesn\'t throw if account is available', async () => { - const availableAccount = (await zeroEx.getAvailableAddressesAsync())[0]; - const varName = 'account'; - return expect(assert.isSenderAddressHexAsync(varName, availableAccount, (zeroEx as any).web3Wrapper)) + it('doesn\'t throw if address is available', async () => { + const availableAddress = (await zeroEx.getAvailableAddressesAsync())[0]; + const varName = 'address'; + return expect(assert.isSenderAddressHexAsync(varName, availableAddress, (zeroEx as any).web3Wrapper)) .to.become(undefined); }); }); |