API Reference / @gtkx/testing / RenderOptions
Type Alias: RenderOptions<Q>
RenderOptions<
Q> =object
Defined in: packages/testing/src/types.ts:175
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/src/types.ts:190
Enable widget animations during the test.
baseElement?
optionalbaseElement?:Container
Defined in: packages/testing/src/types.ts:184
Root of the subtree that bound queries search.
container?
optionalcontainer?:Gtk.Accessible|RootElement
Defined in: packages/testing/src/types.ts:182
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/src/types.ts:188
Render inside React StrictMode.
onCaughtError?
optionalonCaughtError?: (error,errorInfo) =>void
Defined in: packages/testing/src/types.ts:195
Called for errors caught by React error boundaries, which never fail the test. They are logged when this is omitted.
Parameters
error
unknown
errorInfo
Returns
void
onRecoverableError?
optionalonRecoverableError?: (error,errorInfo) =>void
Defined in: packages/testing/src/types.ts:197
Called for errors React recovered from automatically.
Parameters
error
unknown
errorInfo
ErrorInfo
Returns
void
queries?
optionalqueries?:Q
Defined in: packages/testing/src/types.ts:199
Custom queries to bind to the rendered result.
wrapper?
optionalwrapper?:WrapperComponent
Defined in: packages/testing/src/types.ts:186
Component wrapped around the rendered element, such as a context provider.