update test script

This commit is contained in:
Iuri Matias 2018-10-29 17:12:43 +01:00
parent 1f5029c9a8
commit 21d329eb6e
2 changed files with 9 additions and 1 deletions

View File

@ -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,

View File

@ -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
}