Simplify advanceBlock in tests

pull/353/head
Jakub Wojciechowski 8 years ago
parent c6e055689b
commit 2261039d52
  1. 4
      test/CappedCrowdsale.js
  2. 4
      test/Crowdsale.js
  3. 4
      test/FinalizableCrowdsale.js
  4. 4
      test/RefundableCrowdsale.js
  5. 4
      test/SampleCrowdsale.js

@ -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 () {

Loading…
Cancel
Save