Skip to content

Commit 665695f

Browse files
committed
test: add callback to fs.close() in test-fs-stat
To avoid '[DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.' PR-URL: #12804 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 943dd5f commit 665695f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-fs-stat.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fs.open('.', 'r', undefined, common.mustCall(function(err, fd) {
4949
fs.fstat(fd, common.mustCall(function(err, stats) {
5050
assert.ifError(err);
5151
assert.ok(stats.mtime instanceof Date);
52-
fs.close(fd);
52+
fs.close(fd, assert.ifError);
5353
assert.strictEqual(this, global);
5454
}));
5555

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

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

0 commit comments

Comments
 (0)