Hello @zodern and @denyhs, as indicated here, to scroll the result of a search we used the syntax below which allows other asynchronous methods to be invoked within the loop:
for await (const doc of collection.find({})) {
await collection2.findOneAsync(...);
}
This works in version 2.13.3 while alpha version 11 returns the error:
TypeError: cursor[methodName] is not a function
at Cursor.<computed> (packages/mongo/mongo_driver.js:879:30)
at _asyncIterator (/Users/pbeato/Documents/ksource/meteor12.3/meteor-collection2/tests/node_modules/@babel/runtime/helpers/asyncIterator.js:7:41)
at Hook.<anonymous> (multi.tests.js:92:13)
at run (packages/meteortesting:mocha-core/server.js:36:29)
at Context.wrappedFunction (packages/meteortesting:mocha-core/server.js:65:14)
at processImmediate (node:internal/timers:476:21)
at process.topLevelDomainCallback (node:domain:161:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24)
Before opening an issue I wanted to discuss with you to see if I had missed something.