( configuration: TestConfiguration )
| 489 | } |
| 490 | |
| 491 | export async function makeMultiResponseBatchModelArray( |
| 492 | configuration: TestConfiguration |
| 493 | ): Promise<AnyClientBulkWriteModel<any>[]> { |
| 494 | const { maxBsonObjectSize } = await configuration.hello(); |
| 495 | const namespace = `foo.${new BSON.ObjectId().toHexString()}`; |
| 496 | const models: AnyClientBulkWriteModel<any>[] = [ |
| 497 | { |
| 498 | name: 'updateOne', |
| 499 | namespace, |
| 500 | update: { $set: { age: 1 } }, |
| 501 | upsert: true, |
| 502 | filter: { _id: 'a'.repeat(maxBsonObjectSize / 2) } |
| 503 | }, |
| 504 | { |
| 505 | name: 'updateOne', |
| 506 | namespace, |
| 507 | update: { $set: { age: 1 } }, |
| 508 | upsert: true, |
| 509 | filter: { _id: 'b'.repeat(maxBsonObjectSize / 2) } |
| 510 | } |
| 511 | ]; |
| 512 | |
| 513 | return models; |
| 514 | } |
| 515 | |
| 516 | export function fakeServer() { |
| 517 | return { |
no test coverage detected