Skip to content

Commit

Permalink
change fs.close to fs.closeSync (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgruber authored Jan 11, 2017
1 parent dbbb9dc commit 620c5a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion lib/reportGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 620c5a2

Please sign in to comment.