MCPcopy Create free account
hub / github.com/nodejs/node / prioritizesEventEmitter

Function prioritizesEventEmitter

test/parallel/test-events-once.js:151–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149}
150
151async function prioritizesEventEmitter() {
152 const ee = new EventEmitter();
153 ee.addEventListener = assert.fail;
154 ee.removeAllListeners = assert.fail;
155 process.nextTick(() => ee.emit('foo'));
156 await once(ee, 'foo');
157}
158
159async function abortSignalBefore() {
160 const ee = new EventEmitter();

Callers 1

Calls 2

onceFunction · 0.70
emitMethod · 0.45

Tested by

no test coverage detected