From 73fca42ce17f5a6fe2feba445941e77f5dfc7515 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 1 Jun 2018 11:30:02 -0400 Subject: [PATCH] fix error messages for non deployed contracts --- lib/tests/test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/tests/test.js b/lib/tests/test.js index 5269d84bb..43143798b 100644 --- a/lib/tests/test.js +++ b/lib/tests/test.js @@ -32,6 +32,7 @@ class Test { this.contracts = {}; this.events = new Events(); this.ready = true; + this.builtContracts = {}; this.web3 = new Web3(); if (this.simOptions.node) { @@ -52,6 +53,10 @@ class Test { logger: new TestLogger({logLevel: 'debug'}) }); + this.versions_default = this.engine.config.contractsConfig.versions; + // Reset contract config to nothing to make sure we deploy only what we want + this.engine.config.contractsConfig = {contracts: {}, versions: this.versions_default}; + this.engine.startService("libraryManager"); this.engine.startService("codeRunner"); this.engine.startService("web3", { @@ -109,8 +114,7 @@ class Test { const self = this; async.waterfall([ function getConfig(next) { - let _versions_default = self.engine.config.contractsConfig.versions; - self.engine.config.contractsConfig = {contracts: config.contracts, versions: _versions_default}; + self.engine.config.contractsConfig = {contracts: config.contracts, versions: self.versions_default}; self.engine.events.emit(constants.events.contractConfigChanged, self.engine.config.contractsConfig); next(); },