Skip to content

Commit

Permalink
test: use template literals as appropriate
Browse files Browse the repository at this point in the history
Replace string concatenation with template string literals in
test-graph.signal.js.

PR-URL: #14289
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
  • Loading branch information
blade254353074 authored and addaleax committed Jul 18, 2017
1 parent 65bccd5 commit 85c181a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/async-hooks/test-graph.signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ hooks.enable();
process.on('SIGUSR2', common.mustCall(onsigusr2, 2));

let count = 0;
exec('kill -USR2 ' + process.pid);
exec(`kill -USR2 ${process.pid}`);

function onsigusr2() {
count++;

if (count === 1) {
// trigger same signal handler again
exec('kill -USR2 ' + process.pid);
exec(`kill -USR2 ${process.pid}`);
} else {
// install another signal handler
process.removeAllListeners('SIGUSR2');
process.on('SIGUSR2', common.mustCall(onsigusr2Again));

exec('kill -USR2 ' + process.pid);
exec(`kill -USR2 ${process.pid}`);
}
}

Expand Down

0 comments on commit 85c181a

Please sign in to comment.