(testData, operationContext, options)
| 966 | } |
| 967 | |
| 968 | async function testOperations(testData, operationContext, options) { |
| 969 | options = options || { swallowOperationErrors: true }; |
| 970 | |
| 971 | for (const operation of testData.operations) { |
| 972 | const object = operation.object || 'collection'; |
| 973 | if (object === 'collection') { |
| 974 | const db = operationContext.database; |
| 975 | const collectionName = operationContext.collectionName; |
| 976 | const collectionOptions = operation.collectionOptions || {}; |
| 977 | |
| 978 | operationContext[object] = db.collection( |
| 979 | collectionName, |
| 980 | convertCollectionOptions(collectionOptions) |
| 981 | ); |
| 982 | } |
| 983 | await testOperation(operation, operationContext[object], operationContext, options); |
| 984 | } |
| 985 | } |
| 986 | |
| 987 | module.exports = { |
| 988 | TestRunnerContext, |
no test coverage detected