Simplify advanceBlock in tests
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import moment from 'moment'
|
||||
import ether from './helpers/ether'
|
||||
import advanceToBlock from './helpers/advanceToBlock'
|
||||
import {advanceBlock} from './helpers/advanceToBlock'
|
||||
import increaseTime from './helpers/increaseTime'
|
||||
import latestTime from './helpers/latestTime'
|
||||
import EVMThrow from './helpers/EVMThrow'
|
||||
@ -24,7 +24,7 @@ contract('CappedCrowdsale', function ([_, wallet]) {
|
||||
|
||||
before(async function() {
|
||||
//Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc
|
||||
await advanceToBlock(web3.eth.getBlock('latest').number + 1)
|
||||
await advanceBlock()
|
||||
})
|
||||
|
||||
beforeEach(async function () {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import moment from 'moment'
|
||||
import ether from './helpers/ether'
|
||||
import advanceToBlock from './helpers/advanceToBlock'
|
||||
import {advanceBlock} from './helpers/advanceToBlock'
|
||||
import increaseTime from './helpers/increaseTime'
|
||||
import latestTime from './helpers/latestTime'
|
||||
import EVMThrow from './helpers/EVMThrow'
|
||||
@ -24,7 +24,7 @@ contract('Crowdsale', function ([_, investor, wallet, purchaser]) {
|
||||
|
||||
before(async function() {
|
||||
//Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc
|
||||
await advanceToBlock(web3.eth.getBlock('latest').number + 1)
|
||||
await advanceBlock()
|
||||
})
|
||||
|
||||
beforeEach(async function () {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import moment from 'moment'
|
||||
import advanceToBlock from './helpers/advanceToBlock'
|
||||
import {advanceBlock} from './helpers/advanceToBlock'
|
||||
import increaseTime from './helpers/increaseTime'
|
||||
import latestTime from './helpers/latestTime'
|
||||
import EVMThrow from './helpers/EVMThrow'
|
||||
@ -20,7 +20,7 @@ contract('FinalizableCrowdsale', function ([_, owner, wallet, thirdparty]) {
|
||||
|
||||
before(async function() {
|
||||
//Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc
|
||||
await advanceToBlock(web3.eth.getBlock('latest').number + 1)
|
||||
await advanceBlock()
|
||||
})
|
||||
|
||||
beforeEach(async function () {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import moment from 'moment'
|
||||
import ether from './helpers/ether'
|
||||
import advanceToBlock from './helpers/advanceToBlock'
|
||||
import {advanceBlock} from './helpers/advanceToBlock'
|
||||
import increaseTime from './helpers/increaseTime'
|
||||
import latestTime from './helpers/latestTime'
|
||||
import EVMThrow from './helpers/EVMThrow'
|
||||
@ -22,7 +22,7 @@ contract('RefundableCrowdsale', function ([_, owner, wallet, investor]) {
|
||||
|
||||
before(async function() {
|
||||
//Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc
|
||||
await advanceToBlock(web3.eth.getBlock('latest').number + 1)
|
||||
await advanceBlock()
|
||||
})
|
||||
|
||||
beforeEach(async function () {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import moment from 'moment'
|
||||
import ether from './helpers/ether'
|
||||
import advanceToBlock from './helpers/advanceToBlock'
|
||||
import {advanceBlock} from './helpers/advanceToBlock'
|
||||
import increaseTime from './helpers/increaseTime'
|
||||
import latestTime from './helpers/latestTime'
|
||||
import EVMThrow from './helpers/EVMThrow'
|
||||
@ -23,7 +23,7 @@ contract('Crowdsale', function ([owner, wallet, investor]) {
|
||||
|
||||
before(async function() {
|
||||
//Advance to the next block to correctly read time in the solidity "now" function interpreted by testrpc
|
||||
await advanceToBlock(web3.eth.getBlock('latest').number + 1)
|
||||
await advanceBlock()
|
||||
})
|
||||
|
||||
beforeEach(async function () {
|
||||
|
||||
Reference in New Issue
Block a user