MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / flushPromises

Function flushPromises

test/mocks/utils.ts:6–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4export type EventHandler = (...args: unknown[]) => unknown;
5
6export async function flushPromises(): Promise<void> {
7 const nodeTimers = await vi.importActual<typeof import("node:timers")>("node:timers");
8
9 return await new Promise(nodeTimers.setImmediate);
10}
11
12// https://github.com/jestjs/jest/issues/6028#issuecomment-567669082
13export function defuseRejection<T>(promise: Promise<T>): Promise<T> {

Callers 15

controller.test.tsFile · 0.90
frontend.test.tsFile · 0.90
health.test.tsFile · 0.90
receive.test.tsFile · 0.90
onEvent.test.tsFile · 0.90
otaUpdate.test.tsFile · 0.90
publish.test.tsFile · 0.90
bridge.test.tsFile · 0.90
bind.test.tsFile · 0.90
networkMap.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected