1
1
import latestTime from "./helpers/latestTime" ;
2
2
import { duration , promisifyLogWatch , latestBlock } from "./helpers/utils" ;
3
- import { takeSnapshot , increaseTime , revertToSnapshot } from "./helpers/time" ;
3
+ import { takeSnapshot , increaseTime , revertToSnapshot , jumpToTime } from "./helpers/time" ;
4
4
import { encodeProxyCall , encodeModuleCall } from "./helpers/encodeCall" ;
5
5
import { setUpPolymathNetwork , deployScheduleCheckpointAndVerified } from "./helpers/createInstances" ;
6
6
@@ -13,7 +13,7 @@ const Web3 = require("web3");
13
13
let BN = Web3 . utils . BN ;
14
14
const web3 = new Web3 ( new Web3 . providers . HttpProvider ( "http://localhost:8545" ) ) ; // Hardcoded development port
15
15
16
- contract ( "ScheduledCheckpoint" , async ( accounts ) => {
16
+ process . env . COVERAGE ? contract . skip : contract ( "ScheduledCheckpoint" , async ( accounts ) => {
17
17
18
18
const SECONDS = 0 ;
19
19
const DAYS = 1 ;
@@ -73,15 +73,17 @@ contract("ScheduledCheckpoint", async (accounts) => {
73
73
const one_address = "0x0000000000000000000000000000000000000001" ;
74
74
75
75
before ( async ( ) => {
76
- currentTime = new BN ( await latestTime ( ) ) ;
77
76
account_polymath = accounts [ 0 ] ;
78
77
account_issuer = accounts [ 1 ] ;
79
78
80
79
token_owner = account_issuer ;
81
80
82
81
account_investor1 = accounts [ 7 ] ;
83
82
account_investor2 = accounts [ 8 ] ;
84
- account_investor3 = accounts [ 9 ] ;
83
+ account_investor3 = accounts [ 9 ] ;
84
+ //await jumpToTime(Math.floor((new Date().getTime())/1000));
85
+ await jumpToTime ( 1553040000 ) ; // 03/20/2019 @ 12:00am (UTC)
86
+ currentTime = new BN ( await latestTime ( ) ) ;
85
87
86
88
// Step 1: Deploy the genral PM ecosystem
87
89
let instances = await setUpPolymathNetwork ( account_polymath , token_owner ) ;
0 commit comments