Skip to content

Commit e985ec7

Browse files
committed
fixup! lint
1 parent 39741b6 commit e985ec7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/internal/event_target.js

+1-1
Original file line numberDiff line numberDiff 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;

test/parallel/test-eventtarget.js

+5-3
Original file line numberDiff line numberDiff 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 */
3435
let 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

0 commit comments

Comments
 (0)