From 665695fbea4a4dc3c241e7f27738003d00218c78 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Wed, 3 May 2017 04:08:41 +0300 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Santiago Gimeno Reviewed-By: Yuta Hiroto Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-fs-stat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index bf62b4e472076b..dfd45855c0947f 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}`);