mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-22 03:29:43 +00:00
Make sure config is called at least once
This commit is contained in:
parent
ec9949d70e
commit
50fc3d8846
@ -110,6 +110,9 @@ module.exports = {
|
||||
mocha.suite.timeout(0);
|
||||
|
||||
mocha.suite.beforeAll('Wait for deploy', (done) => {
|
||||
if (global.embark.needConfig) {
|
||||
global.config({});
|
||||
}
|
||||
global.embark.onReady((err) => {
|
||||
done(err);
|
||||
});
|
||||
|
@ -41,7 +41,7 @@ class Test {
|
||||
this.builtContracts = {};
|
||||
this.compiledContracts = {};
|
||||
this.logsSubscription = null;
|
||||
|
||||
this.needConfig = true;
|
||||
this.web3 = new Web3();
|
||||
}
|
||||
|
||||
@ -212,6 +212,7 @@ class Test {
|
||||
|
||||
config(options, callback) {
|
||||
const self = this;
|
||||
self.needConfig = false;
|
||||
if (typeof (options) === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
@ -230,7 +231,7 @@ class Test {
|
||||
self.checkDeploymentOptions(options, next);
|
||||
},
|
||||
function compileContracts(next) {
|
||||
if (Object.keys(self.builtContracts).length > 0 && !self.resetServices) {
|
||||
if (Object.keys(self.builtContracts).length > 0) {
|
||||
return next();
|
||||
}
|
||||
console.info('Compiling contracts'.cyan);
|
||||
|
Loading…
x
Reference in New Issue
Block a user