No longer assigning awaits to temporary variables. (#1216)

This commit is contained in:
Nicolás Venturo
2018-08-17 16:10:40 -03:00
committed by GitHub
parent df9426f989
commit 20cf885430
43 changed files with 231 additions and 467 deletions

View File

@ -43,19 +43,12 @@ contract('SampleCrowdsale', function ([_, owner, wallet, investor]) {
this.crowdsale.should.exist;
this.token.should.exist;
const openingTime = await this.crowdsale.openingTime();
const closingTime = await this.crowdsale.closingTime();
const rate = await this.crowdsale.rate();
const walletAddress = await this.crowdsale.wallet();
const goal = await this.crowdsale.goal();
const cap = await this.crowdsale.cap();
openingTime.should.be.bignumber.equal(this.openingTime);
closingTime.should.be.bignumber.equal(this.closingTime);
rate.should.be.bignumber.equal(RATE);
walletAddress.should.be.equal(wallet);
goal.should.be.bignumber.equal(GOAL);
cap.should.be.bignumber.equal(CAP);
(await this.crowdsale.openingTime()).should.be.bignumber.equal(this.openingTime);
(await this.crowdsale.closingTime()).should.be.bignumber.equal(this.closingTime);
(await this.crowdsale.rate()).should.be.bignumber.equal(RATE);
(await this.crowdsale.wallet()).should.be.equal(wallet);
(await this.crowdsale.goal()).should.be.bignumber.equal(GOAL);
(await this.crowdsale.cap()).should.be.bignumber.equal(CAP);
});
it('should not accept payments before start', async function () {

View File

@ -17,18 +17,15 @@ contract('SimpleToken', function ([_, creator]) {
});
it('has a name', async function () {
const name = await token.name();
name.should.eq('SimpleToken');
(await token.name()).should.eq('SimpleToken');
});
it('has a symbol', async function () {
const symbol = await token.symbol();
symbol.should.eq('SIM');
(await token.symbol()).should.eq('SIM');
});
it('has 18 decimals', async function () {
const decimals = await token.decimals();
decimals.should.be.bignumber.equal(18);
(await token.decimals()).should.be.bignumber.equal(18);
});
it('assigns the initial total supply to the creator', async function () {