Skip to content

API Reference / @gtkx/testing / getAllControllers

Function: getAllControllers() ​

getAllControllers<T>(widget, controllerType): T[]

Defined in: packages/testing/src/user-event/controller.ts:53

Returns every controller of the given type attached to a widget.

Type Parameters ​

T ​

T extends EventController

Parameters ​

widget ​

Accessible

The widget whose controllers are inspected.

controllerType ​

ControllerConstructor<T>

The controller class to match.

Returns ​

T[]

Throws ​

When the widget has no controller of that type.