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 <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • 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.