Skip to content

Commit 74dc86d

Browse files
vsemozhetbytMylesBorins
authored andcommitted
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 <[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]>
1 parent a47a9b7 commit 74dc86d

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
@@ -28,7 +28,7 @@ fs.open('.', 'r', undefined, common.mustCall(function(err, fd) {
2828
fs.fstat(fd, common.mustCall(function(err, stats) {
2929
assert.ifError(err);
3030
assert.ok(stats.mtime instanceof Date);
31-
fs.close(fd);
31+
fs.close(fd, assert.ifError);
3232
assert.strictEqual(this, global);
3333
}));
3434

@@ -47,7 +47,7 @@ fs.open('.', 'r', undefined, common.mustCall(function(err, fd) {
4747
console.dir(stats);
4848
assert.ok(stats.mtime instanceof Date);
4949
}
50-
fs.close(fd);
50+
fs.close(fd, assert.ifError);
5151
}));
5252

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

0 commit comments

Comments
 (0)