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

Function convertCollectionOptions

test/tools/spec-runner/index.js:955–966  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

953}
954
955function convertCollectionOptions(options) {
956 const result = {};
957 Object.keys(options).forEach(key => {
958 if (key === 'readPreference') {
959 result[key] = normalizeReadPreference(options[key].mode);
960 } else {
961 result[key] = options[key];
962 }
963 });
964
965 return result;
966}
967
968async function testOperations(testData, operationContext, options) {
969 options = options || { swallowOperationErrors: true };

Callers 1

testOperationsFunction · 0.85

Calls 1

normalizeReadPreferenceFunction · 0.85

Tested by

no test coverage detected