From 86a715abf7c56a193e52848558bce4e7244f126e Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 20 Aug 2018 14:03:20 -0400 Subject: [PATCH] update tests --- test/compiler.js | 10 +++++++++- test/contracts.js | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/test/compiler.js b/test/compiler.js index 8aa9cdca3..ceaccef43 100644 --- a/test/compiler.js +++ b/test/compiler.js @@ -27,7 +27,15 @@ var apiObject = { logger: new TestLogger({}), events: TestEvents, config: { - contractDirectories: ['app/contracts/'] + contractDirectories: ['app/contracts/'], + embarkConfig: { + options: { + solc: { + "optimize": true, + "optimize-runs": 200 + } + } + } } }; diff --git a/test/contracts.js b/test/contracts.js index e9cc2977b..dc142ace2 100644 --- a/test/contracts.js +++ b/test/contracts.js @@ -30,7 +30,15 @@ describe('embark.Contracts', function() { logger: new TestLogger({}), events: TestEvents, config: { - contractDirectories: ['app/contracts/'] + contractDirectories: ['app/contracts/'], + embarkConfig: { + options: { + solc: { + "optimize": true, + "optimize-runs": 200 + } + } + } } }); let ipcObject = new Ipc({ @@ -39,7 +47,20 @@ describe('embark.Contracts', function() { plugins.loadInternalPlugin('solidity', {ipc: ipcObject}); let events = new Events(); - let compiler = new Compiler({events: events, logger: plugins.logger}, {plugins: plugins}); + let embarkObject = { + events: events, + logger: plugins.logger, + embarkConfig: { + options: { + solc: { + "optimize": true, + "optimize-runs": 200 + } + } + } + } + + let compiler = new Compiler(embarkObject, {plugins: plugins}); events.setCommandHandler("config:contractsConfig", function(cb) { cb(contractsConfig); @@ -136,7 +157,15 @@ describe('embark.Contracts', function() { logger: new TestLogger({}), events: TestEvents, config: { - contractDirectories: ['app/contracts/'] + contractDirectories: ['app/contracts/'], + embarkConfig: { + options: { + solc: { + "optimize": true, + "optimize-runs": 200 + } + } + } } }); let ipcObject = new Ipc({