diff --git a/test/parallel/test-fs-truncate-fd.js b/test/parallel/test-fs-truncate-fd.js index 62634aed1d91a7..f71d511f5da057 100644 --- a/test/parallel/test-fs-truncate-fd.js +++ b/test/parallel/test-fs-truncate-fd.js @@ -16,12 +16,12 @@ const msg = 'Using fs.truncate with a file descriptor is deprecated.' + common.expectWarning('DeprecationWarning', msg, 'DEP0081'); -fs.truncate(fd, 5, common.mustCall(function(err) { +fs.truncate(fd, 5, common.mustCall((err) => { assert.ok(!err); assert.strictEqual(fs.readFileSync(filename, 'utf8'), 'hello'); })); -process.on('exit', function() { +process.on('exit', () => { fs.closeSync(fd); fs.unlinkSync(filename); console.log('ok');