File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ class EventTarget {
196
196
// No error code for this since it is a Warning
197
197
// eslint-disable-next-line no-restricted-syntax
198
198
const w = new Error ( `addEventListener called with ${ listener } ` +
199
- ` which has no effect.` ) ;
199
+ ' which has no effect.' ) ;
200
200
w . name = 'AddEventListenerArgumentTypeWarning' ;
201
201
w . target = this ;
202
202
w . type = type ;
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ process.on('warning', (e) => {
31
31
32
32
// Utility promise for parts of the test that need to wait for eachother -
33
33
// Namely tests for warning events
34
+ /* eslint-disable no-unused-vars */
34
35
let asyncTest = Promise . resolve ( ) ;
35
36
36
37
// First, test Event
@@ -389,14 +390,15 @@ let asyncTest = Promise.resolve();
389
390
target . on ( 'foo' , ( ) => { } ) ;
390
391
target . on ( 'foo' , ( ) => { } ) ;
391
392
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 ) ;
394
395
ok ( lastWarning instanceof Error ) ;
395
396
strictEqual ( lastWarning . name , 'MaxListenersExceededWarning' ) ;
396
397
strictEqual ( lastWarning . target , target ) ;
397
398
strictEqual ( lastWarning . count , 2 ) ;
398
399
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 ) ) ;
400
402
} ) . then ( common . mustCall ( ) ) ;
401
403
}
402
404
You can’t perform that action at this time.
0 commit comments