aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-16 20:59:10 +0800
committerFabio Berger <me@fabioberger.com>2018-05-16 20:59:10 +0800
commit839db68571037f6fff8273aaade6ea0bd14ea8a5 (patch)
tree302b3164f01bc5363bf07841a42fa30b3842169e /packages/contracts/test
parentfec6ac3ff0c4781cea0b3f42e287aee2b8aa2a79 (diff)
downloaddexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.gz
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.bz2
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.lz
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.xz
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.tar.zst
dexon-sol-tools-839db68571037f6fff8273aaade6ea0bd14ea8a5.zip
Fix TSLint rules
Diffstat (limited to 'packages/contracts/test')
-rw-r--r--packages/contracts/test/exchange/helpers.ts8
-rw-r--r--packages/contracts/test/unlimited_allowance_token.ts4
-rw-r--r--packages/contracts/test/zrx_token.ts4
3 files changed, 8 insertions, 8 deletions
diff --git a/packages/contracts/test/exchange/helpers.ts b/packages/contracts/test/exchange/helpers.ts
index 441c1bc28..3ee54ce4d 100644
--- a/packages/contracts/test/exchange/helpers.ts
+++ b/packages/contracts/test/exchange/helpers.ts
@@ -123,21 +123,21 @@ describe('Exchange', () => {
});
it('should return true with a valid signature', async () => {
- const success = await exchangeWrapper.isValidSignatureAsync(signedOrder);
+ const isValidSignatureForContract = await exchangeWrapper.isValidSignatureAsync(signedOrder);
const orderHashHex = ZeroEx.getOrderHashHex(signedOrder);
const isValidSignature = ZeroEx.isValidSignature(orderHashHex, signedOrder.ecSignature, signedOrder.maker);
expect(isValidSignature).to.be.true();
- expect(success).to.be.true();
+ expect(isValidSignatureForContract).to.be.true();
});
it('should return false with an invalid signature', async () => {
signedOrder.ecSignature.r = ethUtil.bufferToHex(ethUtil.sha3('invalidR'));
signedOrder.ecSignature.s = ethUtil.bufferToHex(ethUtil.sha3('invalidS'));
- const success = await exchangeWrapper.isValidSignatureAsync(signedOrder);
+ const isValidSignatureForContract = await exchangeWrapper.isValidSignatureAsync(signedOrder);
const orderHashHex = ZeroEx.getOrderHashHex(signedOrder);
const isValidSignature = ZeroEx.isValidSignature(orderHashHex, signedOrder.ecSignature, signedOrder.maker);
expect(isValidSignature).to.be.false();
- expect(success).to.be.false();
+ expect(isValidSignatureForContract).to.be.false();
});
});
diff --git a/packages/contracts/test/unlimited_allowance_token.ts b/packages/contracts/test/unlimited_allowance_token.ts
index da2e5fb5b..754efd256 100644
--- a/packages/contracts/test/unlimited_allowance_token.ts
+++ b/packages/contracts/test/unlimited_allowance_token.ts
@@ -99,8 +99,8 @@ describe('UnlimitedAllowanceToken', () => {
const amountToTransfer = ownerBalance;
const spenderAllowance = await zeroEx.token.getAllowanceAsync(tokenAddress, owner, spender);
- const spenderAllowanceIsInsufficient = spenderAllowance.cmp(amountToTransfer) < 0;
- expect(spenderAllowanceIsInsufficient).to.be.true();
+ const isSpenderAllowanceInsufficient = spenderAllowance.cmp(amountToTransfer) < 0;
+ expect(isSpenderAllowanceInsufficient).to.be.true();
return expect(
token.transferFrom.callAsync(owner, spender, amountToTransfer, {
diff --git a/packages/contracts/test/zrx_token.ts b/packages/contracts/test/zrx_token.ts
index 0056ed4b5..33132487f 100644
--- a/packages/contracts/test/zrx_token.ts
+++ b/packages/contracts/test/zrx_token.ts
@@ -117,8 +117,8 @@ describe('ZRXToken', () => {
const amountToTransfer = ownerBalance;
const spenderAllowance = await zeroEx.token.getAllowanceAsync(zrxAddress, owner, spender);
- const spenderAllowanceIsInsufficient = spenderAllowance.cmp(amountToTransfer) < 0;
- expect(spenderAllowanceIsInsufficient).to.be.true();
+ const isSpenderAllowanceInsufficient = spenderAllowance.cmp(amountToTransfer) < 0;
+ expect(isSpenderAllowanceInsufficient).to.be.true();
const didReturnTrue = await zrx.transferFrom.callAsync(owner, spender, amountToTransfer, { from: spender });
expect(didReturnTrue).to.be.false();