diff --git a/lib/tests/run_tests.js b/lib/tests/run_tests.js index 0c119e23..c3027baf 100644 --- a/lib/tests/run_tests.js +++ b/lib/tests/run_tests.js @@ -39,7 +39,7 @@ function runJSTests(files, options, cb) { async.waterfall([ function setupGlobalNamespace(next) { // TODO put default config - const test = new Test({loglevel, node: options.node}); + const test = new Test({loglevel, node: options.node, coverage: options.coverage}); global.embark = test; global.assert = assert; global.config = test.config.bind(test); diff --git a/lib/tests/test.js b/lib/tests/test.js index 434a0112..d62aa0e8 100644 --- a/lib/tests/test.js +++ b/lib/tests/test.js @@ -154,7 +154,7 @@ class Test { this.engine.startService("deployment", { trackContracts: false, compileOnceOnly: true, - disableOptimizations: true + disableOptimizations: this.options.coverage }); this.gasLimit = 6000000; this.engine.events.request('deploy:setGasLimit', this.gasLimit);