diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/async-hooks/test-disable-in-init.js | 2 | ||||
-rw-r--r-- | test/async-hooks/test-graph.http.js | 8 | ||||
-rw-r--r-- | test/async-hooks/test-graph.pipeconnect.js | 4 | ||||
-rw-r--r-- | test/async-hooks/test-nexttick-default-trigger.js | 4 | ||||
-rw-r--r-- | test/async-hooks/test-pipeconnectwrap.js | 4 | ||||
-rw-r--r-- | test/async-hooks/test-queue-microtask.js | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/test/async-hooks/test-disable-in-init.js b/test/async-hooks/test-disable-in-init.js index b7ab31e6d9..17537c62f3 100644 --- a/test/async-hooks/test-disable-in-init.js +++ b/test/async-hooks/test-disable-in-init.js @@ -7,7 +7,7 @@ const fs = require('fs'); let nestedCall = false; async_hooks.createHook({ - init: common.mustCall(function() { + init: common.mustCall(() => { nestedHook.disable(); if (!nestedCall) { nestedCall = true; diff --git a/test/async-hooks/test-graph.http.js b/test/async-hooks/test-graph.http.js index 12862467a6..db0c126567 100644 --- a/test/async-hooks/test-graph.http.js +++ b/test/async-hooks/test-graph.http.js @@ -11,11 +11,11 @@ const http = require('http'); const hooks = initHooks(); hooks.enable(); -const server = http.createServer(common.mustCall(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end(); - this.close(common.mustCall()); + server.close(common.mustCall()); })); -server.listen(0, common.mustCall(function() { +server.listen(0, common.mustCall(() => { http.get({ host: '::1', family: 6, @@ -23,7 +23,7 @@ server.listen(0, common.mustCall(function() { }, common.mustCall()); })); -process.on('exit', function() { +process.on('exit', () => { hooks.disable(); verifyGraph( diff --git a/test/async-hooks/test-graph.pipeconnect.js b/test/async-hooks/test-graph.pipeconnect.js index 03d2902c83..440ea906a1 100644 --- a/test/async-hooks/test-graph.pipeconnect.js +++ b/test/async-hooks/test-graph.pipeconnect.js @@ -12,9 +12,9 @@ tmpdir.refresh(); const hooks = initHooks(); hooks.enable(); -net.createServer(function(c) { +const server = net.createServer((c) => { c.end(); - this.close(); + server.close(); }).listen(common.PIPE, common.mustCall(onlisten)); function onlisten() { diff --git a/test/async-hooks/test-nexttick-default-trigger.js b/test/async-hooks/test-nexttick-default-trigger.js index 1bc93f2973..7d6d98c9ab 100644 --- a/test/async-hooks/test-nexttick-default-trigger.js +++ b/test/async-hooks/test-nexttick-default-trigger.js @@ -14,11 +14,11 @@ hooks.enable(); const rootAsyncId = async_hooks.executionAsyncId(); -process.nextTick(common.mustCall(function() { +process.nextTick(common.mustCall(() => { assert.strictEqual(async_hooks.triggerAsyncId(), rootAsyncId); })); -process.on('exit', function() { +process.on('exit', () => { hooks.sanityCheck(); const as = hooks.activitiesOfTypes('TickObject'); diff --git a/test/async-hooks/test-pipeconnectwrap.js b/test/async-hooks/test-pipeconnectwrap.js index f086807e39..b57cc63cf5 100644 --- a/test/async-hooks/test-pipeconnectwrap.js +++ b/test/async-hooks/test-pipeconnectwrap.js @@ -17,9 +17,9 @@ let pipe1, pipe2; let pipeserver; let pipeconnect; -net.createServer(common.mustCall(function(c) { +const server = net.createServer(common.mustCall((c) => { c.end(); - this.close(); + server.close(); process.nextTick(maybeOnconnect.bind(null, 'server')); })).listen(common.PIPE, common.mustCall(onlisten)); diff --git a/test/async-hooks/test-queue-microtask.js b/test/async-hooks/test-queue-microtask.js index dfa537752e..1e2029efe4 100644 --- a/test/async-hooks/test-queue-microtask.js +++ b/test/async-hooks/test-queue-microtask.js @@ -11,11 +11,11 @@ hooks.enable(); const rootAsyncId = async_hooks.executionAsyncId(); -queueMicrotask(common.mustCall(function() { +queueMicrotask(common.mustCall(() => { assert.strictEqual(async_hooks.triggerAsyncId(), rootAsyncId); })); -process.on('exit', function() { +process.on('exit', () => { hooks.sanityCheck(); const as = hooks.activitiesOfTypes('Microtask'); |