Skip to content

Commit

Permalink
test: add callback to fs.close() in test-fs-stat
Browse files Browse the repository at this point in the history
To avoid '[DEP0013] DeprecationWarning:
Calling an asynchronous function without callback is deprecated.'

PR-URL: nodejs#12804
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
vsemozhetbyt authored and Olivier Martin committed May 6, 2017
1 parent 01cbe47 commit 908da0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-fs-stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fs.open('.', 'r', undefined, common.mustCall(function(err, fd) {
fs.fstat(fd, common.mustCall(function(err, stats) {
assert.ifError(err);
assert.ok(stats.mtime instanceof Date);
fs.close(fd);
fs.close(fd, assert.ifError);
assert.strictEqual(this, global);
}));

Expand All @@ -68,7 +68,7 @@ fs.open('.', 'r', undefined, common.mustCall(function(err, fd) {
console.dir(stats);
assert.ok(stats.mtime instanceof Date);
}
fs.close(fd);
fs.close(fd, assert.ifError);
}));

console.log(`stating: ${__filename}`);
Expand Down

0 comments on commit 908da0f

Please sign in to comment.