MCPcopy
hub / github.com/mongodb/node-mongodb-native / checkForEvent

Function checkForEvent

test/tools/unified-spec-runner/operations.ts:618–624  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

616 const eventName = Object.keys(event)[0];
617 const eventPromise = new Promise<void>(resolve => {
618 function checkForEvent() {
619 if (getMatchingEventCount(event, mongoClient, entities) >= count) {
620 return resolve();
621 }
622
623 mongoClient.observedEventEmitter.once('observedEvent', checkForEvent);
624 }
625 checkForEvent();
626 });
627 await Promise.race([

Callers 3

operations.tsFile · 0.85
checkForEventMethod · 0.85
waitForEventMethod · 0.85

Calls 3

getMatchingEventCountFunction · 0.90
onceMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected