Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 619 Bytes

ecosystem-rtl-simple-queries.md

File metadata and controls

26 lines (19 loc) · 619 Bytes
id title
ecosystem-rtl-simple-queries
rtl-simple-queries

rtl-simple-queries is a companion library for React Testing Library that provides an alternative query API.

npm install --save-dev rtl-simple-queries
import {screen} from 'rtl-simple-queries'

screen.fetchByText(/text/, {allowEmpty: true, allowMultiple: false})
screen.fetchByText(/text/, {allowMultiple: false})
screen.fetchByText(/text/)

// async
await screen.fetchByTextAsync(/text/, {allowMultiple: true})