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

Function testYield

test/parallel/test-timers-promises-scheduler.js:9–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const assert = require('assert');
8
9async function testYield() {
10 await scheduler.yield();
11 process.emit('foo');
12}
13testYield().then(common.mustCall());
14queueMicrotask(common.mustCall(() => {
15 process.addListener('foo', common.mustCall());

Calls 2

yieldMethod · 0.80
emitMethod · 0.45

Tested by

no test coverage detected