Moved advanceBlock to time. (#1523)

* Added advanceBlock to time, moved tests around.

* Removed the standalone advanceBlock.

* Removed the 'id' field

* Fixed linter error.

* Removed the 'latest' test, since it only works if time hasn't been fast-forwarded.

* Removed .only directive.
This commit is contained in:
Nicolás Venturo
2018-11-29 18:23:20 -03:00
committed by GitHub
parent 7ef2730506
commit 6fd0010325
10 changed files with 63 additions and 98 deletions

View File

@ -1,5 +1,4 @@
const { ether } = require('../helpers/ether');
const { advanceBlock } = require('../helpers/advanceToBlock');
const shouldFail = require('../helpers/shouldFail');
const time = require('../helpers/time');
const { balanceDifference } = require('../helpers/balanceDifference');
@ -20,7 +19,7 @@ contract('SampleCrowdsale', function ([_, deployer, owner, wallet, investor]) {
before(async function () {
// Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache
await advanceBlock();
await time.advanceBlock();
});
beforeEach(async function () {