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

Function topologyWithPlaceholderClient

test/tools/utils.ts:328–342  ·  view source on GitHub ↗
(
  seeds: string | string[] | HostAddress | HostAddress[],
  options: Partial<TopologyOptions>
)

Source from the content-addressed store, hash-verified

326 * accept a client with access to a logger. This helper serves to keep old tests working with minimal
327 * changes*/
328export function topologyWithPlaceholderClient(
329 seeds: string | string[] | HostAddress | HostAddress[],
330 options: Partial<TopologyOptions>
331): Topology {
332 return new Topology(
333 new MongoClient(
334 'mongodb://iLoveJavaScript',
335 options.serverSelectionTimeoutMS
336 ? { serverSelectionTimeoutMS: options.serverSelectionTimeoutMS }
337 : {}
338 ),
339 seeds,
340 options as TopologyOptions
341 );
342}
343
344export async function itInNodeProcess(
345 title: string,

Callers 14

makeAndConnectReplSetFunction · 0.90
error.test.tsFile · 0.90
runSrvPollerTestFunction · 0.90
setupTestFunction · 0.90
monitor.test.tsFile · 0.90
topology.test.tsFile · 0.90
server.test.tsFile · 0.90
get_more.test.tsFile · 0.90

Calls

no outgoing calls

Tested by 2

makeAndConnectReplSetFunction · 0.72
runSrvPollerTestFunction · 0.72