mirror of https://github.com/embarklabs/embark.git
Only disable optimizations with coverage.
This means that any test runs without coverage will run optimized Solidity code instead.
This commit is contained in:
parent
27973461b1
commit
7104c18b83
|
@ -39,7 +39,7 @@ function runJSTests(files, options, cb) {
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function setupGlobalNamespace(next) {
|
function setupGlobalNamespace(next) {
|
||||||
// TODO put default config
|
// 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.embark = test;
|
||||||
global.assert = assert;
|
global.assert = assert;
|
||||||
global.config = test.config.bind(test);
|
global.config = test.config.bind(test);
|
||||||
|
|
|
@ -154,7 +154,7 @@ class Test {
|
||||||
this.engine.startService("deployment", {
|
this.engine.startService("deployment", {
|
||||||
trackContracts: false,
|
trackContracts: false,
|
||||||
compileOnceOnly: true,
|
compileOnceOnly: true,
|
||||||
disableOptimizations: true
|
disableOptimizations: this.options.coverage
|
||||||
});
|
});
|
||||||
this.gasLimit = 6000000;
|
this.gasLimit = 6000000;
|
||||||
this.engine.events.request('deploy:setGasLimit', this.gasLimit);
|
this.engine.events.request('deploy:setGasLimit', this.gasLimit);
|
||||||
|
|
Loading…
Reference in New Issue