diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index 57a0345f..392fe24b 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -140,10 +140,6 @@ class ContractDeployer { return next(); } - // TODO find a better way to do that - if (process.env.isTest) { - return self.deployContract(contract, next); - } self.plugins.emitAndRunActionsForEvent('deploy:contract:shouldDeploy', {contract: contract, shouldDeploy: true}, function(_err, params) { let trackedContract = params.contract; if (!params.shouldDeploy) { diff --git a/lib/modules/deploytracker/index.js b/lib/modules/deploytracker/index.js index c086b25d..da74ca58 100644 --- a/lib/modules/deploytracker/index.js +++ b/lib/modules/deploytracker/index.js @@ -26,6 +26,10 @@ class DeployTracker { }); self.embark.registerActionForEvent("deploy:contract:shouldDeploy", (params, cb) => { + if (process.env.isTest) { + return cb(params); + } + let contract = params.contract; let trackedContract = self.getContract(contract.className, contract.realRuntimeBytecode, contract.realArgs); if (trackedContract) {