From 74dc86d239914d179ad330dba2e4920a1a848586 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 00fcc1df21c586..0c3a2e8b4801c2 100644 --- a/test/parallel/test-fs-stat.js +++ b/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}`);