GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: add test to once() in event lib · nodejs/node@0f60bc9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-events-once.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-events-once.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-events-once.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ async function onceWithEventTargetError() {
150150
strictEqual(err, error);
151151
}
152152

153+
async function onceWithInvalidEventEmmiter() {
154+
const ac = new AbortController();
155+
return rejects(once(ac, 'myevent'), {
156+
code: 'ERR_INVALID_ARG_TYPE',
157+
});
158+
}
159+
153160
async function prioritizesEventEmitter() {
154161
const ee = new EventEmitter();
155162
ee.addEventListener = fail;
@@ -256,6 +263,7 @@ Promise.all([
256263
onceError(),
257264
onceWithEventTarget(),
258265
onceWithEventTargetError(),
266+
onceWithInvalidEventEmmiter(),
259267
prioritizesEventEmitter(),
260268
abortSignalBefore(),
261269
abortSignalAfter(),

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.