React Testing Library · Matcher
toContainElement
render mounts a React element for a test and returns queries plus helpers for inspecting, updating, and removing the rendered output. It is the main entry point for testing React components with React Testing Library.
Last updated
Syntax
function render(ui: React.ReactElement<any>, options?: { /* render options */ }): RenderResultIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
renderRenderResultcleanupactrenderHookconfigurewithingetBy