From 668e0be0c340cbabcdf169c43ee95d121f3a7078 Mon Sep 17 00:00:00 2001 From: ed0wolf Date: Tue, 8 Nov 2016 09:31:02 +0000 Subject: [PATCH] Setting web3 on Embark Test constructor so it can be used before deploying contracts --- lib/test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/test.js b/lib/test.js index 87d8a0b6..651b3151 100644 --- a/lib/test.js +++ b/lib/test.js @@ -19,12 +19,13 @@ var Test = function(options) { console.log('For more information see https://github.com/ethereumjs/testrpc'); exit(); } + + this.web3 = new Web3(); + this.web3.setProvider(this.sim.provider()); }; Test.prototype.deployAll = function(contractsConfig, cb) { var self = this; - this.web3 = new Web3(); - this.web3.setProvider(this.sim.provider()); var logger = new TestLogger({logLevel: 'debug'}); async.waterfall([