@ -6,7 +6,7 @@ var events = require('events');
var e = new events . EventEmitter ( ) ;
var e = new events . EventEmitter ( ) ;
// default
// default
for ( var i = 0 ; i < 10 ; i ++ ) {
for ( let i = 0 ; i < 10 ; i ++ ) {
e . on ( 'default' , function ( ) { } ) ;
e . on ( 'default' , function ( ) { } ) ;
}
}
assert . ok ( ! e . _ events [ 'default' ] . hasOwnProperty ( 'warned' ) ) ;
assert . ok ( ! e . _ events [ 'default' ] . hasOwnProperty ( 'warned' ) ) ;
@ -15,7 +15,7 @@ assert.ok(e._events['default'].warned);
// specific
// specific
e . setMaxListeners ( 5 ) ;
e . setMaxListeners ( 5 ) ;
for ( var i = 0 ; i < 5 ; i ++ ) {
for ( let i = 0 ; i < 5 ; i ++ ) {
e . on ( 'specific' , function ( ) { } ) ;
e . on ( 'specific' , function ( ) { } ) ;
}
}
assert . ok ( ! e . _ events [ 'specific' ] . hasOwnProperty ( 'warned' ) ) ;
assert . ok ( ! e . _ events [ 'specific' ] . hasOwnProperty ( 'warned' ) ) ;
@ -31,7 +31,7 @@ assert.ok(e._events['only one'].hasOwnProperty('warned'));
// unlimited
// unlimited
e . setMaxListeners ( 0 ) ;
e . setMaxListeners ( 0 ) ;
for ( var i = 0 ; i < 1000 ; i ++ ) {
for ( let i = 0 ; i < 1000 ; i ++ ) {
e . on ( 'unlimited' , function ( ) { } ) ;
e . on ( 'unlimited' , function ( ) { } ) ;
}
}
assert . ok ( ! e . _ events [ 'unlimited' ] . hasOwnProperty ( 'warned' ) ) ;
assert . ok ( ! e . _ events [ 'unlimited' ] . hasOwnProperty ( 'warned' ) ) ;
@ -40,7 +40,7 @@ assert.ok(!e._events['unlimited'].hasOwnProperty('warned'));
events . EventEmitter . defaultMaxListeners = 42 ;
events . EventEmitter . defaultMaxListeners = 42 ;
e = new events . EventEmitter ( ) ;
e = new events . EventEmitter ( ) ;
for ( var i = 0 ; i < 42 ; ++ i ) {
for ( let i = 0 ; i < 42 ; ++ i ) {
e . on ( 'fortytwo' , function ( ) { } ) ;
e . on ( 'fortytwo' , function ( ) { } ) ;
}
}
assert . ok ( ! e . _ events [ 'fortytwo' ] . hasOwnProperty ( 'warned' ) ) ;
assert . ok ( ! e . _ events [ 'fortytwo' ] . hasOwnProperty ( 'warned' ) ) ;