React Testing Library · Pipe
asFragment
React Testing Library's render mounts a React element and returns queries and helpers for testing it. The API also includes cleanup, hooks, actions, and configuration utilities.
Last updated
Syntax
function render(ui: React.ReactElement<any>, options?: RenderOptions): RenderResultIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
renderrenderHookcleanupactconfigurescreenasFragmentunmount