diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-05-03 04:08:41 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-05-05 05:09:00 +0300 |
commit | 665695fbea4a4dc3c241e7f27738003d00218c78 (patch) | |
tree | fe719d5a1d03b07772e940dcdf8390f146a611fb | |
parent | 943dd5f9ed1857d9f04cdca77ed5139d69918173 (diff) | |
download | node-new-665695fbea4a4dc3c241e7f27738003d00218c78.tar.gz |
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>
-rw-r--r-- | test/parallel/test-fs-stat.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index bf62b4e472..dfd45855c0 100644 --- a/test/parallel/test-fs-stat.js +++ b/test/parallel/test-fs-stat.js @@ -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); })); @@ -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}`); |