From 21d329eb6ec6994236ea11bd8233248a2377641d Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 29 Oct 2018 17:12:43 +0100 Subject: [PATCH] update test script --- lib/core/plugins.js | 8 +++++++- test/contracts.js | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/core/plugins.js b/lib/core/plugins.js index 5df5bccb0..f7b37cb65 100644 --- a/lib/core/plugins.js +++ b/lib/core/plugins.js @@ -53,7 +53,13 @@ Plugins.prototype.createPlugin = function(pluginName, pluginConfig) { Plugins.prototype.loadInternalPlugin = function(pluginName, pluginConfig) { var pluginPath = fs.embarkPath('lib/modules/' + pluginName); - var plugin = require(pluginPath); + var plugin; + try { + plugin = require(pluginPath); + } catch(_e) { + pluginPath = fs.embarkPath('modules/' + pluginName); + plugin = require(pluginPath); + } var pluginWrapper = new Plugin({ name: pluginName, diff --git a/test/contracts.js b/test/contracts.js index 4de7e2a9e..c3c8057e0 100644 --- a/test/contracts.js +++ b/test/contracts.js @@ -108,6 +108,7 @@ describe('embark.Contracts', function() { }; let embarkObj = { + registerAPICall: () => {}, logger: new Logger({}), events: events }; @@ -232,6 +233,7 @@ describe('embark.Contracts', function() { } let embarkObj = { + registerAPICall: () => {}, logger: new Logger({}), events: events }