From 3b6135ff2c2690c66444f2b9373a583b6abc68a1 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 14 Nov 2018 20:34:16 -0500 Subject: [PATCH] test: use destructuring and remove unused arguments Use destructuring consistently and remove unused function arguments in test-pipewrap.js PR-URL: https://github.com/nodejs/node/pull/24375 Reviewed-By: Rich Trott Reviewed-By: Weijia Wang Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Luigi Pinca Reviewed-By: Franziska Hinkelmann Reviewed-By: Trivikram Kamat --- test/async-hooks/test-pipewrap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/async-hooks/test-pipewrap.js b/test/async-hooks/test-pipewrap.js index f2b5bf985225b9..d4df64d743069e 100644 --- a/test/async-hooks/test-pipewrap.js +++ b/test/async-hooks/test-pipewrap.js @@ -8,7 +8,7 @@ const assert = require('assert'); const tick = require('./tick'); const initHooks = require('./init-hooks'); const { checkInvocations } = require('./hook-checks'); -const spawn = require('child_process').spawn; +const { spawn } = require('child_process'); if (!common.isMainThread) common.skip('Worker bootstrapping works differently -> different async IDs'); @@ -45,7 +45,7 @@ checkInvocations(processwrap, { init: 1 }, checkInvocations(x, { init: 1 }, 'pipe wrap when sleep.spawn was called'); }); -function onsleepExit(code) { +function onsleepExit() { checkInvocations(processwrap, { init: 1, before: 1 }, 'processwrap while in onsleepExit callback'); }