We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69aafc3 commit 0f60bc9Copy full SHA for 0f60bc9
test/parallel/test-events-once.js
@@ -150,6 +150,13 @@ async function onceWithEventTargetError() {
150
strictEqual(err, error);
151
}
152
153
+async function onceWithInvalidEventEmmiter() {
154
+ const ac = new AbortController();
155
+ return rejects(once(ac, 'myevent'), {
156
+ code: 'ERR_INVALID_ARG_TYPE',
157
+ });
158
+}
159
+
160
async function prioritizesEventEmitter() {
161
const ee = new EventEmitter();
162
ee.addEventListener = fail;
@@ -256,6 +263,7 @@ Promise.all([
256
263
onceError(),
257
264
onceWithEventTarget(),
258
265
onceWithEventTargetError(),
266
+ onceWithInvalidEventEmmiter(),
259
267
prioritizesEventEmitter(),
260
268
abortSignalBefore(),
261
269
abortSignalAfter(),
0 commit comments