(client: Client | undefined, timeout = 2000)
| 123 | * @returns A promise that resolves when flush and dispose are complete |
| 124 | */ |
| 125 | export async function flushAndDispose(client: Client | undefined, timeout = 2000): Promise<void> { |
| 126 | if (!client) { |
| 127 | await flush(timeout); |
| 128 | |
| 129 | return; |
| 130 | } |
| 131 | |
| 132 | await client.flush(timeout); |
| 133 | client.dispose(); |
| 134 | } |
no test coverage detected