diff --git a/test/parallel/test-events-once.js b/test/parallel/test-events-once.js index 0b1d5677f60109..5ae5461d92676c 100644 --- a/test/parallel/test-events-once.js +++ b/test/parallel/test-events-once.js @@ -150,6 +150,13 @@ async function onceWithEventTargetError() { strictEqual(err, error); } +async function onceWithInvalidEventEmmiter() { + const ac = new AbortController(); + return rejects(once(ac, 'myevent'), { + code: 'ERR_INVALID_ARG_TYPE', + }); +} + async function prioritizesEventEmitter() { const ee = new EventEmitter(); ee.addEventListener = fail; @@ -256,6 +263,7 @@ Promise.all([ onceError(), onceWithEventTarget(), onceWithEventTargetError(), + onceWithInvalidEventEmmiter(), prioritizesEventEmitter(), abortSignalBefore(), abortSignalAfter(),