Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/parallel/test-timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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]);
});
Expand Down