(options: MongoClientOptions, id?: string)
| 467 | testsToEnableLogging = flakyTests; |
| 468 | |
| 469 | setupLogging(options: MongoClientOptions, id?: string) { |
| 470 | id ??= new ObjectId().toString(); |
| 471 | this.logs = []; |
| 472 | const write = log => this.logs.push({ t: log.t, id, ...log }); |
| 473 | options.mongodbLogPath = { write }; |
| 474 | options.mongodbLogComponentSeverities = { default: class="st">'trace' }; |
| 475 | options.mongodbLogMaxDocumentLength = 300; |
| 476 | return options; |
| 477 | } |
| 478 | |
| 479 | beforeEachLogging(ctx: Context) { |
| 480 | this.loggingEnabled = this.testsToEnableLogging.includes(ctx.currentTest.fullTitle()); |
no test coverage detected