mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-02 00:45:55 +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.timeout(0);
|
||||||
|
|
||||||
mocha.suite.beforeAll('Wait for deploy', (done) => {
|
mocha.suite.beforeAll('Wait for deploy', (done) => {
|
||||||
|
if (global.embark.needConfig) {
|
||||||
|
global.config({});
|
||||||
|
}
|
||||||
global.embark.onReady((err) => {
|
global.embark.onReady((err) => {
|
||||||
done(err);
|
done(err);
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ class Test {
|
|||||||
this.builtContracts = {};
|
this.builtContracts = {};
|
||||||
this.compiledContracts = {};
|
this.compiledContracts = {};
|
||||||
this.logsSubscription = null;
|
this.logsSubscription = null;
|
||||||
|
this.needConfig = true;
|
||||||
this.web3 = new Web3();
|
this.web3 = new Web3();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,6 +212,7 @@ class Test {
|
|||||||
|
|
||||||
config(options, callback) {
|
config(options, callback) {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
self.needConfig = false;
|
||||||
if (typeof (options) === 'function') {
|
if (typeof (options) === 'function') {
|
||||||
callback = options;
|
callback = options;
|
||||||
options = {};
|
options = {};
|
||||||
@ -230,7 +231,7 @@ class Test {
|
|||||||
self.checkDeploymentOptions(options, next);
|
self.checkDeploymentOptions(options, next);
|
||||||
},
|
},
|
||||||
function compileContracts(next) {
|
function compileContracts(next) {
|
||||||
if (Object.keys(self.builtContracts).length > 0 && !self.resetServices) {
|
if (Object.keys(self.builtContracts).length > 0) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
console.info('Compiling contracts'.cyan);
|
console.info('Compiling contracts'.cyan);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user