diff options
author | Hiroaki KARASAWA <siqvare@gmail.com> | 2017-11-26 17:34:16 +0900 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-11-26 09:09:37 -0800 |
commit | bd9f7d5994d526e0ec0877ebd694a0873fa8b390 (patch) | |
tree | f0c672454c4679ef0656510456bd083f93fe9dcb /test | |
parent | 54ff3b6b052c561e127ae5f5a02f1ad6895b61d7 (diff) | |
download | android-node-v8-bd9f7d5994d526e0ec0877ebd694a0873fa8b390.tar.gz android-node-v8-bd9f7d5994d526e0ec0877ebd694a0873fa8b390.tar.bz2 android-node-v8-bd9f7d5994d526e0ec0877ebd694a0873fa8b390.zip |
test: replace function with arrow function
PR-URL: https://github.com/nodejs/node/pull/17308
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-timers.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js index 120e07a05f..9a93c55eff 100644 --- a/test/parallel/test-timers.js +++ b/test/parallel/test-timers.js @@ -54,12 +54,12 @@ const inputs = [ const timeouts = []; const intervals = []; -inputs.forEach(function(value, index) { - setTimeout(function() { +inputs.forEach((value, index) => { + setTimeout(() => { timeouts[index] = true; }, value); - const handle = setInterval(function() { + const handle = setInterval(() => { clearInterval(handle); // disarm timer or we'll never finish intervals[index] = true; }, value); @@ -68,9 +68,9 @@ inputs.forEach(function(value, index) { // All values in inputs array coerce to 1 ms. Therefore, they should all run // before a timer set here for 2 ms. -setTimeout(common.mustCall(function() { +setTimeout(common.mustCall(() => { // assert that all other timers have run - inputs.forEach(function(value, index) { + inputs.forEach((value, index) => { assert(timeouts[index]); assert(intervals[index]); }); |