From 19c81e187bc0db65b925495f0dc795e112f5a7bc Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Thu, 9 Aug 2018 15:46:10 -0400 Subject: [PATCH] Cleaning touches --- lib/modules/blockchain_process/proxy.js | 1 - lib/modules/coverage/contract_source.js | 2 +- lib/modules/coverage/index.js | 8 +++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/modules/blockchain_process/proxy.js b/lib/modules/blockchain_process/proxy.js index 02b070af..ae48aabd 100644 --- a/lib/modules/blockchain_process/proxy.js +++ b/lib/modules/blockchain_process/proxy.js @@ -36,7 +36,6 @@ const parseResponse = function(ipc, resBody){ } catch(e) { return; // Response is not a json. Do nothing } - console.log(jsonO); if(commList[jsonO.id]){ commList[jsonO.id].transactionHash = jsonO.result; transactions[jsonO.result] = {commListId: jsonO.id}; diff --git a/lib/modules/coverage/contract_source.js b/lib/modules/coverage/contract_source.js index 9b65e64c..cd6a4db5 100644 --- a/lib/modules/coverage/contract_source.js +++ b/lib/modules/coverage/contract_source.js @@ -238,7 +238,7 @@ class ContractSource { break; default: - console.log(`Don't know how to handle node type ${node.nodeType}`); + // console.log(`Don't know how to handle node type ${node.nodeType}`); break; } diff --git a/lib/modules/coverage/index.js b/lib/modules/coverage/index.js index f71c4917..ea5367c3 100644 --- a/lib/modules/coverage/index.js +++ b/lib/modules/coverage/index.js @@ -1,7 +1,7 @@ /*global web3*/ -const fs = require('fs'); const process = require('process'); +const fs = require('../../core/fs'); const ContractSources = require('./contract_sources'); // Set up the web3 extension @@ -23,8 +23,10 @@ class CodeCoverage { this.seenTransactions = {}; var self = this; - process.on('exit', (code) => { - fs.writeFileSync('/tmp/coverage.json', JSON.stringify(this.coverageReport)); + + process.on('exit', (_code) => { + const coverageReportPath = fs.dappPath('.embark', 'coverage.json'); + fs.writeFileSync(coverageReportPath, JSON.stringify(self.coverageReport)); }); }