MCPcopy Index your code
hub / github.com/nodejs/node / foo

Function foo

test/parallel/test-events-on-async-iterator.js:298–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

296 const i = setInterval(() => ee.emit('foo', 'foo'), 10);
297
298 async function foo() {
299 for await (const f of on(ee, 'foo', { signal: ac.signal })) {
300 assert.strictEqual(f, 'foo');
301 }
302 }
303
304 foo().catch(common.mustCall((error) => {
305 assert.strictEqual(error.name, 'AbortError');

Callers 4

abortableOnAfterFunction · 0.70
abortableOnAfterDoneFunction · 0.70

Calls 3

abortMethod · 0.65
onFunction · 0.50
assertFunction · 0.50

Tested by

no test coverage detected