File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ const inputs = [
33
33
const timeouts = [ ] ;
34
34
const intervals = [ ] ;
35
35
36
- inputs . forEach ( function ( value , index ) {
37
- setTimeout ( function ( ) {
36
+ inputs . forEach ( ( value , index ) => {
37
+ setTimeout ( ( ) => {
38
38
timeouts [ index ] = true ;
39
39
} , value ) ;
40
40
41
- const handle = setInterval ( function ( ) {
41
+ const handle = setInterval ( ( ) => {
42
42
clearInterval ( handle ) ; // disarm timer or we'll never finish
43
43
intervals [ index ] = true ;
44
44
} , value ) ;
@@ -47,9 +47,9 @@ inputs.forEach(function(value, index) {
47
47
// All values in inputs array coerce to 1 ms. Therefore, they should all run
48
48
// before a timer set here for 2 ms.
49
49
50
- setTimeout ( common . mustCall ( function ( ) {
50
+ setTimeout ( common . mustCall ( ( ) => {
51
51
// assert that all other timers have run
52
- inputs . forEach ( function ( value , index ) {
52
+ inputs . forEach ( ( value , index ) => {
53
53
assert . strictEqual ( true , timeouts [ index ] ) ;
54
54
assert . strictEqual ( true , intervals [ index ] ) ;
55
55
} ) ;
You can’t perform that action at this time.
0 commit comments