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

Function makeAndConnectReplSet

test/unit/error.test.ts:352–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

350 beforeEach(() => test.setup());
351
352 async function makeAndConnectReplSet(): Promise<Topology> {
353 const replSet = topologyWithPlaceholderClient(
354 [test.primaryServer.hostAddress(), test.firstSecondaryServer.hostAddress()],
355 { replicaSet: 'rs' } as TopologyOptions
356 );
357
358 const topology = await replSet.connect();
359 return topology;
360 }
361
362 it('should expose a user command writeConcern error like a normal WriteConcernError', function () {
363 test.primaryServer.setMessageHandler(request => {

Callers 1

error.test.tsFile · 0.85

Calls 3

hostAddressMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected