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

Function condition

test/parallel/test-runner-wait-for.js:108–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 let count = 0;
107
108 function condition() {
109 count++;
110 return new Promise((resolve) => {
111 setTimeout(() => {
112 resolve('success');
113 }, 200);
114 });
115 }
116
117 const result = await t.waitFor(condition, {
118 interval: 1,

Callers 5

pollerMethod · 0.50
gcUntilFunction · 0.50
tickFunction · 0.50
tickFunction · 0.50
testFunction · 0.50

Calls 2

setTimeoutFunction · 0.50
resolveFunction · 0.50

Tested by 1

testFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…