Skip to content

Commit 1cd4076

Browse files
spring_raininggibfahn
authored andcommitted
test: replace function with arrow function
Replace some classic functions with arrow functions in test-child-process-send-cb.js PR-URL: #17312 Reviewed-By: Ron Korving <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c519287 commit 1cd4076

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎test/parallel/test-child-process-send-cb.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ const assert = require('assert');
44
constfork=require('child_process').fork;
55

66
if(process.argv[2]==='child'){
7-
process.send('ok',common.mustCall(function(err){
7+
process.send('ok',common.mustCall((err)=>{
88
assert.strictEqual(err,null);
99
}));
1010
}else{
1111
constchild=fork(process.argv[1],['child']);
12-
child.on('message',common.mustCall(function(message){
12+
child.on('message',common.mustCall((message)=>{
1313
assert.strictEqual(message,'ok');
1414
}));
15-
child.on('exit',common.mustCall(function(exitCode,signalCode){
15+
child.on('exit',common.mustCall((exitCode,signalCode)=>{
1616
assert.strictEqual(exitCode,0);
1717
assert.strictEqual(signalCode,null);
1818
}));

0 commit comments

Comments
(0)