()
| 21 | import { collectGarbage } from '../../src/Utility/System/garbageCollector'; |
| 22 | |
| 23 | function showActiveHandles() { |
| 24 | const open = (process as any)._getActiveHandles().filter( |
| 25 | (each: any) => |
| 26 | !each.destroyed && // discard handles that claim they are destroyed. |
| 27 | !(each.fd === 0) && // ignore stdin/stdout/stderr |
| 28 | !(each.fd === 1) && // ignore stdin/stdout/stderr |
| 29 | !(each.fd === 2) && // ignore stdin/stdout/stderr |
| 30 | !(each instanceof MessagePort) && // ignore worker thread message ports |
| 31 | each.listening // keep servers that are still listening. |
| 32 | |
| 33 | ); |
| 34 | |
| 35 | if (open.length) { |
| 36 | console.log('################'); |
| 37 | console.log('Active Handles: '); |
| 38 | console.log('################'); |
| 39 | console.log(open); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | let misbehavingPromises: Set<Promise<any>>; |
| 44 |
no test coverage detected