update tests

This commit is contained in:
Iuri Matias 2017-12-16 16:05:46 -05:00
parent ce6c570634
commit 67dd4a22cb
4 changed files with 11 additions and 4 deletions

View File

@ -130,7 +130,7 @@ class Engine {
let self = this; let self = this;
this.registerModule('solidity', { this.registerModule('solidity', {
solcVersion: self.config.contractsConfig.solcVersion, solcVersion: self.config.contractsConfig.versions.solc,
contractDirectories: self.config.contractDirectories contractDirectories: self.config.contractDirectories
}); });

View File

@ -33,7 +33,7 @@ Plugin.prototype.loadPlugin = function() {
}; };
Plugin.prototype.loadInternalPlugin = function() { Plugin.prototype.loadInternalPlugin = function() {
new this.pluginModule(this, this.pluginConfig); new this.pluginModule(this, this.pluginConfig); /*eslint no-new: "off"*/
}; };
Plugin.prototype.loadPluginFile = function(filename) { Plugin.prototype.loadPluginFile = function(filename) {

View File

@ -1,5 +1,6 @@
/*globals describe, it*/ /*globals describe, it*/
let Compiler = require('../lib/contracts/compiler.js'); let Compiler = require('../lib/contracts/compiler.js');
let SolidityCompiler = require('../lib/modules/solidity');
let TestLogger = require('../lib/core/test_logger.js'); let TestLogger = require('../lib/core/test_logger.js');
let File = require('../lib/core/file.js'); let File = require('../lib/core/file.js');
let assert = require('assert'); let assert = require('assert');
@ -9,8 +10,14 @@ let readFile = function(file) {
return new File({filename: file, type: 'dapp_file', path: file}); return new File({filename: file, type: 'dapp_file', path: file});
}; };
var apiObject = {
registerCompiler: function() {},
logger: new TestLogger({})
};
describe('embark.Compiler', function() { describe('embark.Compiler', function() {
let compiler = new Compiler({logger: new TestLogger({}), solcVersion: '0.4.17', contractDirectories: ['app/contracts/']}); //let compiler = new Compiler({logger: new TestLogger({})});
let compiler = new SolidityCompiler(apiObject, {solcVersion: '0.4.17', contractDirectories: ['app/contracts/']});
describe('#compile_solidity', function() { describe('#compile_solidity', function() {
this.timeout(0); this.timeout(0);

View File

@ -9,7 +9,7 @@ let readFile = function(file) {
return new File({filename: file, type: 'dapp_file', path: file}); return new File({filename: file, type: 'dapp_file', path: file});
}; };
describe('embark.Contratcs', function() { describe('embark.Contracts', function() {
this.timeout(0); this.timeout(0);
describe('simple', function() { describe('simple', function() {
let contractsManager = new ContractsManager({ let contractsManager = new ContractsManager({