File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ class EventTarget {
196196 // No error code for this since it is a Warning
197197 // eslint-disable-next-line no-restricted-syntax
198198 const w = new Error ( `addEventListener called with ${ listener } ` +
199- ` which has no effect.` ) ;
199+ ' which has no effect.' ) ;
200200 w . name = 'AddEventListenerArgumentTypeWarning' ;
201201 w . target = this ;
202202 w . type = type ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ process.on('warning', (e) => {
3131
3232// Utility promise for parts of the test that need to wait for eachother -
3333// Namely tests for warning events
34+ /* eslint-disable no-unused-vars */
3435let asyncTest = Promise . resolve ( ) ;
3536
3637// First, test Event
@@ -389,14 +390,15 @@ let asyncTest = Promise.resolve();
389390 target . on ( 'foo' , ( ) => { } ) ;
390391 target . on ( 'foo' , ( ) => { } ) ;
391392
392- // warnings are always emitted asynchronously so wait for a tick
393- await delay ( 0 )
393+ // Warnings are always emitted asynchronously so wait for a tick
394+ await delay ( 0 ) ;
394395 ok ( lastWarning instanceof Error ) ;
395396 strictEqual ( lastWarning . name , 'MaxListenersExceededWarning' ) ;
396397 strictEqual ( lastWarning . target , target ) ;
397398 strictEqual ( lastWarning . count , 2 ) ;
398399 strictEqual ( lastWarning . type , 'foo' ) ;
399- ok ( lastWarning . message . includes ( '2 foo listeners added to NodeEventTarget' ) ) ;
400+ const warning = '2 foo listeners added to NodeEventTarget' ;
401+ ok ( lastWarning . message . includes ( warning ) ) ;
400402 } ) . then ( common . mustCall ( ) ) ;
401403}
402404
You can’t perform that action at this time.
0 commit comments