update tests

This commit is contained in:
Iuri Matias 2018-06-05 08:38:27 -04:00
parent 0e6d526ab4
commit a3bb4bc53b
2 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,7 @@
let SolidityCompiler = require('../lib/modules/solidity');
let TestLogger = require('../lib/tests/test_logger.js');
let File = require('../lib/core/file.js');
let Ipc = require('../lib/core/ipc.js');
let assert = require('assert');
let readFile = function(file) {
@ -16,6 +17,10 @@ var TestEvents = {
}
};
let ipcObject = new Ipc({
ipcRole: 'none'
});
var apiObject = {
registerCompiler: function() {},
logger: new TestLogger({}),
@ -27,7 +32,7 @@ var apiObject = {
describe('embark.Compiler', function() {
//let compiler = new Compiler({logger: new TestLogger({})});
let compiler = new SolidityCompiler(apiObject);
let compiler = new SolidityCompiler(apiObject, {ipc: ipcObject});
describe('#compile_solidity', function() {
this.timeout(0);

View File

@ -5,6 +5,7 @@ let Logger = require('../lib/core/logger.js');
let File = require('../lib/core/file.js');
let TestLogger = require('../lib/tests/test_logger.js');
let Events = require('../lib/core/events');
let Ipc = require('../lib/core/ipc.js');
let assert = require('assert');
//let SolidityCompiler = require('../lib/modules/solidity');
@ -31,7 +32,10 @@ describe('embark.Contracts', function() {
contractDirectories: ['app/contracts/']
}
});
plugins.loadInternalPlugin('solidity');
let ipcObject = new Ipc({
ipcRole: 'none'
});
plugins.loadInternalPlugin('solidity', {ipc: ipcObject});
let compiler = new Compiler({plugins: plugins, logger: plugins.logger});
let events = new Events();
@ -123,7 +127,10 @@ describe('embark.Contracts', function() {
contractDirectories: ['app/contracts/']
}
});
plugins.loadInternalPlugin('solidity');
let ipcObject = new Ipc({
ipcRole: 'none'
});
plugins.loadInternalPlugin('solidity', {ipc: ipcObject});
let compiler = new Compiler({plugins: plugins, logger: plugins.logger});
let events = new Events();