-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Line 9 in 039ae17
| // We can't use getByText here because... no match? Need to find why. |
getByText() will search for all elements that have a text node with textContent matching the given TextMatch
getByText(
container: HTMLElement,
text: TextMatch,
options?: {
selector?: string = '*',
exact?: boolean = true,
ignore?: string|boolean = 'script, style',
normalizer?: NormalizerFn,
}): HTMLElement
<a href="/about">About ℹ️</a>
import { render } from '@testing-library/react'
const { getByText } = render(<MyComponent />)
const aboutAnchorNode = getByText(/about/i)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
