Browse Source

test: add callback to fs.close() in test-fs-stat

To avoid '[DEP0013] DeprecationWarning:
Calling an asynchronous function without callback is deprecated.'

PR-URL: https://github.com/nodejs/node/pull/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>
v6.x
Vse Mozhet Byt 8 years ago
committed by Myles Borins
parent
commit
74dc86d239
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 4
      test/parallel/test-fs-stat.js

4
test/parallel/test-fs-stat.js

@ -28,7 +28,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);
}));
@ -47,7 +47,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}`);

Loading…
Cancel
Save