Package-level declarations

Types

Link copied to clipboard
external interface Config : Config
Link copied to clipboard
external interface ConfigFn
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external interface RenderHookResult<Result, Props>
Link copied to clipboard
external interface RenderHookResultResult<Result>
Link copied to clipboard
external interface RenderOptions<Container, BaseElement>
Link copied to clipboard

Functions

Link copied to clipboard
external fun cleanup()

Unmounts React trees that were mounted with render.

Link copied to clipboard
external fun configure(configDelta: Config)
external fun configure(configDelta: ConfigFn)
Link copied to clipboard
external fun getConfig(): Config
Link copied to clipboard
external fun render(ui: ReactNode, options: RenderOptions<*, *>? = definedExternally): RenderResult<*, *>

Render into a container which is appended to document.body. It should be used with cleanup.

Link copied to clipboard
external fun <Result, Props, Container, BaseElement> renderHook(render: (initialProps: Props) -> Result, options: RenderHookOptions<Props, Container, BaseElement>? = definedExternally): RenderHookResult<Result, Props>

Allows you to render a hook within a test React component without having to create that component yourself.