From 67dd4a22cb8da24d20ddb917f4635fbf1b53933b Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 16 Dec 2017 16:05:46 -0500 Subject: [PATCH] update tests --- lib/core/engine.js | 2 +- lib/core/plugin.js | 2 +- test/compiler.js | 9 ++++++++- test/contracts.js | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/core/engine.js b/lib/core/engine.js index d689f3fe..785fc4fd 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -130,7 +130,7 @@ class Engine { let self = this; this.registerModule('solidity', { - solcVersion: self.config.contractsConfig.solcVersion, + solcVersion: self.config.contractsConfig.versions.solc, contractDirectories: self.config.contractDirectories }); diff --git a/lib/core/plugin.js b/lib/core/plugin.js index 59272374..c7812e5c 100644 --- a/lib/core/plugin.js +++ b/lib/core/plugin.js @@ -33,7 +33,7 @@ Plugin.prototype.loadPlugin = 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) { diff --git a/test/compiler.js b/test/compiler.js index 8ad45e23..e0f32da2 100644 --- a/test/compiler.js +++ b/test/compiler.js @@ -1,5 +1,6 @@ /*globals describe, it*/ let Compiler = require('../lib/contracts/compiler.js'); +let SolidityCompiler = require('../lib/modules/solidity'); let TestLogger = require('../lib/core/test_logger.js'); let File = require('../lib/core/file.js'); let assert = require('assert'); @@ -9,8 +10,14 @@ let readFile = function(file) { return new File({filename: file, type: 'dapp_file', path: file}); }; +var apiObject = { + registerCompiler: function() {}, + logger: new TestLogger({}) +}; + 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() { this.timeout(0); diff --git a/test/contracts.js b/test/contracts.js index eeb33d9f..0d395776 100644 --- a/test/contracts.js +++ b/test/contracts.js @@ -9,7 +9,7 @@ let readFile = function(file) { return new File({filename: file, type: 'dapp_file', path: file}); }; -describe('embark.Contratcs', function() { +describe('embark.Contracts', function() { this.timeout(0); describe('simple', function() { let contractsManager = new ContractsManager({