-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
As of today RTL exports screen
, an object of all the query functions pre-bound to document.body
. This means you don't have to use the return value of render
anymore, which is a little less confusing for beginners.
import { render, screen } from '@testing-library/react'
test('example', () => {
render(<Thing />);
expect(screen.queryText(/not here/i)).toBeNull();
})
Metadata
Metadata
Assignees
Labels
No labels