aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test/order_validation_test.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-23 00:04:50 +0800
committerGitHub <noreply@github.com>2018-05-23 00:04:50 +0800
commitcc840a6911850856c3254f7ac73cd70c527e1a5c (patch)
treec7435ac7ce09541a67f0106a85f391dc48921e10 /packages/contract-wrappers/test/order_validation_test.ts
parenta26cc7c14d4e59102d5f84d534f75c42b8683cad (diff)
parentc4a2f700172e8be367225d90a1c51cef8cf0d7dd (diff)
downloaddexon-sol-tools-cc840a6911850856c3254f7ac73cd70c527e1a5c.tar
dexon-sol-tools-cc840a6911850856c3254f7ac73cd70c527e1a5c.tar.gz
dexon-sol-tools-cc840a6911850856c3254f7ac73cd70c527e1a5c.tar.bz2
dexon-sol-tools-cc840a6911850856c3254f7ac73cd70c527e1a5c.tar.lz
dexon-sol-tools-cc840a6911850856c3254f7ac73cd70c527e1a5c.tar.xz
dexon-sol-tools-cc840a6911850856c3254f7ac73cd70c527e1a5c.tar.zst
dexon-sol-tools-cc840a6911850856c3254f7ac73cd70c527e1a5c.zip
Merge pull request #594 from 0xProject/improvement/addCustomTslintRules
Add more tslint rules
Diffstat (limited to 'packages/contract-wrappers/test/order_validation_test.ts')
-rw-r--r--packages/contract-wrappers/test/order_validation_test.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/contract-wrappers/test/order_validation_test.ts b/packages/contract-wrappers/test/order_validation_test.ts
index 2acdece3e..a14dc24b6 100644
--- a/packages/contract-wrappers/test/order_validation_test.ts
+++ b/packages/contract-wrappers/test/order_validation_test.ts
@@ -106,6 +106,7 @@ describe('OrderValidation', () => {
});
it('should succeed if the order is asymmetric and fillable', async () => {
const makerFillableAmount = fillableAmount;
+ // tslint:disable-next-line:custom-no-magic-numbers
const takerFillableAmount = fillableAmount.minus(4);
const signedOrder = await fillScenarios.createAsymmetricFillableSignedOrderAsync(
makerTokenAddress,
@@ -172,6 +173,7 @@ describe('OrderValidation', () => {
fillableAmount,
);
// 27 <--> 28
+ // tslint:disable-next-line:custom-no-magic-numbers
signedOrder.ecSignature.v = 28 - signedOrder.ecSignature.v + 27;
return expect(
contractWrappers.exchange.validateFillOrderThrowIfInvalidAsync(
@@ -206,6 +208,7 @@ describe('OrderValidation', () => {
takerAddress,
fillableAmount,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
const nonTakerAddress = userAddresses[6];
return expect(
contractWrappers.exchange.validateFillOrderThrowIfInvalidAsync(
@@ -353,6 +356,7 @@ describe('OrderValidation', () => {
takerAddress,
zrxTokenAddress,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
expect(
transferFromAsync
@@ -423,6 +427,7 @@ describe('OrderValidation', () => {
takerAddress,
zrxTokenAddress,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
expect(
transferFromAsync
@@ -491,6 +496,7 @@ describe('OrderValidation', () => {
takerAddress,
zrxTokenAddress,
);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
const makerFillAmount = transferFromAsync.getCall(0).args[3];
expect(makerFillAmount).to.be.bignumber.equal(makerTokenAmount);
@@ -518,6 +524,7 @@ describe('OrderValidation', () => {
);
const makerPartialFee = makerFee.div(2);
const takerPartialFee = takerFee.div(2);
+ // tslint:disable-next-line:custom-no-magic-numbers
expect(transferFromAsync.callCount).to.be.equal(4);
const partialMakerFee = transferFromAsync.getCall(2).args[3];
expect(partialMakerFee).to.be.bignumber.equal(makerPartialFee);