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?
optionalareAnimationsEnabled?:boolean
Defined in: packages/testing/dist/types.d.ts:157
Enable widget animations during the test.
baseElement?
optionalbaseElement?:Container
Defined in: packages/testing/dist/types.d.ts:151
Root of the subtree that bound queries search.
container?
optionalcontainer?: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?
optionalisReactStrictMode?:boolean
Defined in: packages/testing/dist/types.d.ts:155
Render inside React StrictMode.
onCaughtError?
optionalonCaughtError?: (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?
optionalonRecoverableError?: (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?
optionalqueries?:Q
Defined in: packages/testing/dist/types.d.ts:163
Custom queries to bind to the rendered result.
wrapper?
optionalwrapper?:WrapperComponent
Defined in: packages/testing/dist/types.d.ts:153
Component wrapped around the rendered element, such as a context provider.