From d6257dcbb90c12cab9a407d12c61ca144365e8b8 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 18 May 2018 12:58:09 -0400 Subject: [PATCH] fix contract tests --- test/contracts.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/contracts.js b/test/contracts.js index 229aa0f2..3090f416 100644 --- a/test/contracts.js +++ b/test/contracts.js @@ -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/']});