fix contract tests

This commit is contained in:
Jonathan Rainville 2018-05-18 12:58:09 -04:00
parent c94d8e9f91
commit d6257dcbb9
1 changed files with 11 additions and 2 deletions

View File

@ -13,11 +13,19 @@ let readFile = function(file) {
return new File({filename: file, type: File.types.dapp_file, path: file});
};
const currentSolcVersion = require('../package.json').dependencies.solc;
const TestEvents = {
request: (cmd, cb) => {
cb(currentSolcVersion);
}
};
describe('embark.Contracts', function() {
this.timeout(0);
describe('simple', function() {
let plugins = new Plugins({
logger: new TestLogger({})
logger: new TestLogger({}),
events: TestEvents
});
plugins.loadInternalPlugin('solidity', {solcVersion: '0.4.17', contractDirectories: ['app/contracts/']});
@ -99,7 +107,8 @@ describe('embark.Contracts', function() {
describe('config with contract instances', function() {
let plugins = new Plugins({
logger: new TestLogger({})
logger: new TestLogger({}),
events: TestEvents
});
plugins.loadInternalPlugin('solidity', {solcVersion: '0.4.17', contractDirectories: ['app/contracts/']});