From 103262f435a530d3deb3d50eece7fddaa8332bfa Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Fri, 14 Sep 2018 16:43:58 -0400 Subject: [PATCH] Write coverage report asynchronously --- lib/modules/coverage/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/modules/coverage/index.js b/lib/modules/coverage/index.js index 8dfe6583d..f71c30b81 100644 --- a/lib/modules/coverage/index.js +++ b/lib/modules/coverage/index.js @@ -41,9 +41,9 @@ class CodeCoverage { } updateCoverageReport(cb) { - fs.mkdirpSync(this.dotEmbarkPath); - fs.writeFileSync(this.coverageReportPath, JSON.stringify(this.coverageReport)); - cb(); + fs.mkdirp(this.dotEmbarkPath, () => { + fs.writeFile(this.coverageReportPath, JSON.stringify(this.coverageReport), cb); + }); } async runSolc(receipt) {