| 306 | // ========================================================================== |
| 307 | |
| 308 | private setupQuietMode(): void { |
| 309 | // Skip if already set up or if integrationTest mode |
| 310 | if (this.originalConsole || this.options.integrationTest) { |
| 311 | return |
| 312 | } |
| 313 | |
| 314 | // Suppress node warnings. |
| 315 | this.originalProcessEmitWarning = process.emitWarning |
| 316 | process.emitWarning = () => {} |
| 317 | process.on("warning", () => {}) |
| 318 | |
| 319 | // Suppress console output. |
| 320 | this.originalConsole = { |
| 321 | log: console.log, |
| 322 | warn: console.warn, |
| 323 | error: console.error, |
| 324 | debug: console.debug, |
| 325 | info: console.info, |
| 326 | } |
| 327 | |
| 328 | console.log = () => {} |
| 329 | console.warn = () => {} |
| 330 | console.debug = () => {} |
| 331 | console.info = () => {} |
| 332 | } |
| 333 | |
| 334 | private restoreConsole(): void { |
| 335 | if (!this.originalConsole) { |