Skip to content

API Reference / @gtkx/testing / RenderOptions

Type Alias: RenderOptions<Q>

RenderOptions<Q> = object

Defined in: packages/testing/dist/types.d.ts:142

Options for render: the container and base element to mount into, an optional wrapper, React behavior toggles, error callbacks, and custom queries to bind.

Type Parameters

Q

Q extends QueryMap = Record<never, never>

Properties

areAnimationsEnabled?

optional areAnimationsEnabled?: boolean

Defined in: packages/testing/dist/types.d.ts:157

Enable widget animations during the test.


baseElement?

optional baseElement?: Container

Defined in: packages/testing/dist/types.d.ts:151

Root of the subtree that bound queries search.


container?

optional container?: Gtk.Widget | RootElement

Defined in: packages/testing/dist/types.d.ts:149

Widget or root element to mount into; an undecorated harness window is created when omitted. A widget container that sits outside every toplevel, such as a bare Gtk.Box, keeps the tree out of reach of a pointer and a keyboard, so every userEvent helper aimed at it rejects after actionabilityTimeout; fireEvent drives such a tree instead.


isReactStrictMode?

optional isReactStrictMode?: boolean

Defined in: packages/testing/dist/types.d.ts:155

Render inside React StrictMode.


onCaughtError?

optional onCaughtError?: (error, errorInfo) => void

Defined in: packages/testing/dist/types.d.ts:159

Called for errors caught by React error boundaries.

Parameters

error

unknown

errorInfo

ErrorInfo

Returns

void


onRecoverableError?

optional onRecoverableError?: (error, errorInfo) => void

Defined in: packages/testing/dist/types.d.ts:161

Called for errors React recovered from automatically.

Parameters

error

unknown

errorInfo

ErrorInfo

Returns

void


queries?

optional queries?: Q

Defined in: packages/testing/dist/types.d.ts:163

Custom queries to bind to the rendered result.


wrapper?

optional wrapper?: WrapperComponent

Defined in: packages/testing/dist/types.d.ts:153

Component wrapped around the rendered element, such as a context provider.

Released under the MPL-2.0 License.