()
| 161 | } |
| 162 | |
| 163 | function end(): void { |
| 164 | const main = require(file!); |
| 165 | |
| 166 | if (!main.teardown) { |
| 167 | exitProcess(); |
| 168 | |
| 169 | return; |
| 170 | } |
| 171 | |
| 172 | execFunction(main.teardown, main, [], exitProcess, exitProcess); |
| 173 | } |
| 174 | |
| 175 | function exitProcess(): void { |
| 176 | // Clean up open handles so the worker ideally exits gracefully |
no test coverage detected