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) {