mirror of https://github.com/embarklabs/embark.git
remove isTest
This commit is contained in:
parent
5fa089d51c
commit
ffbd39882a
|
@ -167,7 +167,7 @@ class Engine {
|
|||
this.registerModule('solidity', {ipc: self.ipc, useDashboard: this.useDashboard});
|
||||
this.registerModule('vyper');
|
||||
this.registerModule('profiler');
|
||||
this.registerModule('deploytracker');
|
||||
this.registerModule('deploytracker', {trackContracts: options.trackContracts});
|
||||
this.registerModule('specialconfigs');
|
||||
this.registerModule('console_listener', {ipc: self.ipc});
|
||||
this.registerModule('contracts_manager');
|
||||
|
|
|
@ -7,7 +7,7 @@ let utils = require('../../utils/utils.js');
|
|||
// TODO: create a contract object
|
||||
|
||||
class ContractsManager {
|
||||
constructor(embark) {
|
||||
constructor(embark, options) {
|
||||
const self = this;
|
||||
this.logger = embark.logger;
|
||||
this.events = embark.events;
|
||||
|
@ -16,6 +16,7 @@ class ContractsManager {
|
|||
this.contractDependencies = {};
|
||||
this.deployOnlyOnConfig = false;
|
||||
this.compileError = false;
|
||||
this.compileOnceOnly = options.compileOnceOnly;
|
||||
|
||||
self.events.setCommandHandler('contracts:list', (cb) => {
|
||||
cb(self.compileError, self.listContracts());
|
||||
|
@ -77,7 +78,7 @@ class ContractsManager {
|
|||
},
|
||||
function compileContracts(callback) {
|
||||
self.events.emit("status", __("Compiling..."));
|
||||
if (process.env.isTest && self.compiledContracts && Object.keys(self.compiledContracts).length) {
|
||||
if (self.compileOnceOnly && self.compiledContracts && Object.keys(self.compiledContracts).length) {
|
||||
// Only compile once for tests
|
||||
return callback();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ class DeployTracker {
|
|||
this.logger = embark.logger;
|
||||
this.events = embark.events;
|
||||
this.embark = embark;
|
||||
this.trackContracts = (options.trackContracts !== false);
|
||||
|
||||
// TODO: unclear where it comes from
|
||||
this.env = options.env;
|
||||
|
@ -26,7 +27,7 @@ class DeployTracker {
|
|||
});
|
||||
|
||||
self.embark.registerActionForEvent("deploy:contract:shouldDeploy", (params, cb) => {
|
||||
if (process.env.isTest) {
|
||||
if (!self.trackContracts) {
|
||||
return cb(params);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ function getFilesFromDir(filePath, cb) {
|
|||
|
||||
module.exports = {
|
||||
run: function (options) {
|
||||
process.env.isTest = true;
|
||||
let failures = 0;
|
||||
let filePath = options.file;
|
||||
const loglevel = options.loglevel || 'warn';
|
||||
|
|
|
@ -108,7 +108,8 @@ class Test {
|
|||
web3: this.web3
|
||||
});
|
||||
this.engine.startService("deployment", {
|
||||
trackContracts: false
|
||||
trackContracts: false,
|
||||
compileOnceOnly: true
|
||||
});
|
||||
this.events.request('deploy:setGasLimit', 6000000);
|
||||
this.engine.startService("codeCoverage");
|
||||
|
|
Loading…
Reference in New Issue