Skip to main content

Function: tick()

tick(): Promise<void>

Defined in: timing.ts:17

Yields to the event loop, allowing pending GTK events to process.

Use this after actions that trigger async widget updates.

Returns

Promise<void>

Promise that resolves on the next event loop tick

Example

import { tick } from "@gtkx/testing";

widget.setSensitive(false);
await tick(); // Wait for GTK to process the change
expect(widget.getSensitive()).toBe(false);