Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5eb0c99

Browse filesBrowse files
karszawagibfahn
authored andcommitted
test: replace function with arrow function
PR-URL: #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>
1 parent 6b99341 commit 5eb0c99
Copy full SHA for 5eb0c99

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-timers.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-timers.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ const inputs = [
5454
const timeouts = [];
5555
const intervals = [];
5656

57-
inputs.forEach(function(value, index) {
58-
setTimeout(function() {
57+
inputs.forEach((value, index) => {
58+
setTimeout(() => {
5959
timeouts[index] = true;
6060
}, value);
6161

62-
const handle = setInterval(function() {
62+
const handle = setInterval(() => {
6363
clearInterval(handle); // disarm timer or we'll never finish
6464
intervals[index] = true;
6565
}, value);
@@ -68,9 +68,9 @@ inputs.forEach(function(value, index) {
6868
// All values in inputs array coerce to 1 ms. Therefore, they should all run
6969
// before a timer set here for 2 ms.
7070

71-
setTimeout(common.mustCall(function() {
71+
setTimeout(common.mustCall(() => {
7272
// assert that all other timers have run
73-
inputs.forEach(function(value, index) {
73+
inputs.forEach((value, index) => {
7474
assert(timeouts[index]);
7575
assert(intervals[index]);
7676
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.