diff --git a/CHANGELOG.md b/CHANGELOG.md index d863db6..b7654ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ #Changelog +###1.5.5 +- Change `fs.close` method to `fs.closeSync` in `reportGenerator.js` to be in line with other sync methods. Addresses [#107](https://github.com/adamgruber/mochawesome/issues/107) + ###1.5.4 - Run pending tests thru `cleanTest` function. Fixes possible scenario where a pending test with a large amount of text could cause node to run out of memory. See [#94](https://github.com/adamgruber/mochawesome/issues/94) diff --git a/lib/reportGenerator.js b/lib/reportGenerator.js index ed59ab3..38858a5 100644 --- a/lib/reportGenerator.js +++ b/lib/reportGenerator.js @@ -79,7 +79,7 @@ function saveToFile (data, outFile, callback) { try { writeFile = fs.openSync(outFile, 'w'); fs.writeSync(writeFile, data); - fs.close(writeFile); + fs.closeSync(writeFile); callback(null, outFile); } catch (err) { console.log('\n[' + chalk.gray('mochawesome') + '] Error: Unable to save ' + outFile + '\n' + err + '\n'); diff --git a/package.json b/package.json index 9b945e8..39acc0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mochawesome", - "version": "1.5.4", + "version": "1.5.5", "description": "A Gorgeous HTML/CSS Reporter for Mocha.js", "scripts": { "test": "gulp build"