mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
fix options varible; make cc happy
This commit is contained in:
parent
e806a14af6
commit
5477b7f11c
@ -12,7 +12,8 @@ var RunCode = require('./runCode.js');
|
|||||||
var TestLogger = require('./test_logger.js');
|
var TestLogger = require('./test_logger.js');
|
||||||
|
|
||||||
var Test = function(options) {
|
var Test = function(options) {
|
||||||
this.options = _options || {};
|
this.options = options || {};
|
||||||
|
this.logger = new TestLogger({logLevel: this.options.logLevel || 'debug'});
|
||||||
var simOptions = this.options.simulatorOptions || {};
|
var simOptions = this.options.simulatorOptions || {};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -39,11 +40,10 @@ var Test = function(options) {
|
|||||||
|
|
||||||
Test.prototype.deployAll = function(contractsConfig, cb) {
|
Test.prototype.deployAll = function(contractsConfig, cb) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var logger = new TestLogger({logLevel: this.options.logLevel || 'debug'});
|
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function getConfig(callback) {
|
function getConfig(callback) {
|
||||||
var config = new Config({env: 'test', logger: logger});
|
var config = new Config({env: 'test', logger: self.logger});
|
||||||
config.loadConfigFiles({
|
config.loadConfigFiles({
|
||||||
embarkConfig: self.options.embarkConfig || 'embark.json',
|
embarkConfig: self.options.embarkConfig || 'embark.json',
|
||||||
interceptLogs: false
|
interceptLogs: false
|
||||||
@ -55,7 +55,7 @@ Test.prototype.deployAll = function(contractsConfig, cb) {
|
|||||||
var contractsManager = new ContractsManager({
|
var contractsManager = new ContractsManager({
|
||||||
contractFiles: config.contractsFiles,
|
contractFiles: config.contractsFiles,
|
||||||
contractsConfig: config.contractsConfig,
|
contractsConfig: config.contractsConfig,
|
||||||
logger: logger,
|
logger: self.logger,
|
||||||
plugins: config.plugins
|
plugins: config.plugins
|
||||||
});
|
});
|
||||||
contractsManager.build(function() {
|
contractsManager.build(function() {
|
||||||
@ -66,7 +66,7 @@ Test.prototype.deployAll = function(contractsConfig, cb) {
|
|||||||
var deploy = new Deploy({
|
var deploy = new Deploy({
|
||||||
web3: self.web3,
|
web3: self.web3,
|
||||||
contractsManager: contractsManager,
|
contractsManager: contractsManager,
|
||||||
logger: logger,
|
logger: self.logger,
|
||||||
chainConfig: false,
|
chainConfig: false,
|
||||||
env: 'test'
|
env: 'test'
|
||||||
});
|
});
|
||||||
@ -89,11 +89,7 @@ Test.prototype.deployAll = function(contractsConfig, cb) {
|
|||||||
}
|
}
|
||||||
self.web3.eth.defaultAccount = accounts[0];
|
self.web3.eth.defaultAccount = accounts[0];
|
||||||
RunCode.doEval(result, self.web3); // jshint ignore:line
|
RunCode.doEval(result, self.web3); // jshint ignore:line
|
||||||
if (self.options.logging) {
|
cb();
|
||||||
cb(logger);
|
|
||||||
} else {
|
|
||||||
cb();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user