Fix lint errors.
This commit is contained in:
@ -11,7 +11,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
|
||||
|
||||
it('requires a non-null token', async function () {
|
||||
await shouldFail.reverting(
|
||||
Crowdsale.new(rate, wallet, ZERO_ADDRESS)
|
||||
Crowdsale.new(rate, wallet, constants.ZERO_ADDRESS)
|
||||
);
|
||||
});
|
||||
|
||||
@ -28,7 +28,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
|
||||
|
||||
it('requires a non-null wallet', async function () {
|
||||
await shouldFail.reverting(
|
||||
Crowdsale.new(rate, ZERO_ADDRESS, this.token.address)
|
||||
Crowdsale.new(rate, constants.ZERO_ADDRESS, this.token.address)
|
||||
);
|
||||
});
|
||||
|
||||
@ -64,7 +64,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
|
||||
|
||||
it('requires a non-null beneficiary', async function () {
|
||||
await shouldFail.reverting(
|
||||
this.crowdsale.buyTokens(ZERO_ADDRESS, { value: value, from: purchaser })
|
||||
this.crowdsale.buyTokens(constants.ZERO_ADDRESS, { value: value, from: purchaser })
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -79,8 +79,7 @@ contract('TokenVesting', function ([_, owner, beneficiary]) {
|
||||
it('should release proper amount after cliff', async function () {
|
||||
await time.increaseTo(this.start.add(this.cliffDuration));
|
||||
|
||||
const { receipt } = await this.vesting.release(this.token.address);
|
||||
const block = await web3.eth.getBlock(receipt.blockNumber);
|
||||
await this.vesting.release(this.token.address);
|
||||
const releaseTime = await time.latest();
|
||||
|
||||
const releasedAmount = amount.mul(releaseTime.sub(this.start)).div(this.duration);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const { BN, balance, ether, should, shouldFail, time } = require('openzeppelin-test-helpers');;
|
||||
const { BN, balance, ether, should, shouldFail, time } = require('openzeppelin-test-helpers');
|
||||
|
||||
const SampleCrowdsale = artifacts.require('SampleCrowdsale');
|
||||
const SampleCrowdsaleToken = artifacts.require('SampleCrowdsaleToken');
|
||||
@ -72,14 +72,14 @@ contract('SampleCrowdsale', function ([_, deployer, owner, wallet, investor]) {
|
||||
await time.increaseTo(this.openingTime);
|
||||
await this.crowdsale.send(GOAL);
|
||||
|
||||
(await balanceDifference(wallet, async () => {
|
||||
(await balance.difference(wallet, async () => {
|
||||
await time.increaseTo(this.afterClosingTime);
|
||||
await this.crowdsale.finalize({ from: owner });
|
||||
})).should.be.bignumber.equal(GOAL);
|
||||
});
|
||||
|
||||
it('should allow refunds if the goal is not reached', async function () {
|
||||
(await balanceDifference(investor, async () => {
|
||||
(await balance.difference(investor, async () => {
|
||||
await time.increaseTo(this.openingTime);
|
||||
await this.crowdsale.sendTransaction({ value: ether('1'), from: investor, gasPrice: 0 });
|
||||
await time.increaseTo(this.afterClosingTime);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const { constants, expectEvent } = require('openzeppelin-test-helpers');;
|
||||
const { constants, expectEvent } = require('openzeppelin-test-helpers');
|
||||
|
||||
const SimpleToken = artifacts.require('SimpleToken');
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const { BN, shouldFail } = require('openzeppelin-test-helpers');
|
||||
const { shouldFail } = require('openzeppelin-test-helpers');
|
||||
const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
|
||||
|
||||
const ERC165Mock = artifacts.require('ERC165Mock');
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
const { BN } = require('openzeppelin-test-helpers');;
|
||||
const { BN } = require('openzeppelin-test-helpers');
|
||||
|
||||
const MathMock = artifacts.require('MathMock');
|
||||
|
||||
|
||||
@ -290,7 +290,9 @@ contract('ERC20', function ([_, initialHolder, recipient, anotherAccount]) {
|
||||
});
|
||||
|
||||
it('reverts when more than the full allowance is removed', async function () {
|
||||
await shouldFail.reverting(this.token.decreaseAllowance(spender, approvedAmount.addn(1), { from: initialHolder }));
|
||||
await shouldFail.reverting(
|
||||
this.token.decreaseAllowance(spender, approvedAmount.addn(1), { from: initialHolder })
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -169,7 +169,9 @@ function shouldBehaveLikeERC721 (
|
||||
const tokensListed = await Promise.all(
|
||||
[0, 1].map(i => this.token.tokenOfOwnerByIndex(owner, i))
|
||||
);
|
||||
tokensListed.map(t => t.toNumber()).should.have.members([firstTokenId.toNumber(), secondTokenId.toNumber()]);
|
||||
tokensListed.map(t => t.toNumber()).should.have.members(
|
||||
[firstTokenId.toNumber(), secondTokenId.toNumber()]
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -196,7 +198,9 @@ function shouldBehaveLikeERC721 (
|
||||
|
||||
context('when the address to transfer the token to is the zero address', function () {
|
||||
it('reverts', async function () {
|
||||
await shouldFail.reverting(transferFunction.call(this, owner, constants.ZERO_ADDRESS, tokenId, { from: owner }));
|
||||
await shouldFail.reverting(
|
||||
transferFunction.call(this, owner, constants.ZERO_ADDRESS, tokenId, { from: owner })
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user