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(); },