Files
next.js/test/production/jest/rsc/app/client-component.test.jsx
Janka UrygaandGitHub dfaf137b81 test: remove "@testing-library/jest-dom" from default jest setup (#78157)
We aren't using `'@testing-library/jest-dom'` in 99% of the tests, so
there's no point loading it for every test. I've removed it from
`jest-setup-after-env` and added the import manually to each file that
uses it.
2025-04-14 22:02:25 +02:00

12 lines
304 B
React

/**
* @jest-environment jsdom
*/
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'
import Component from './client-component'
it('works with client-only code', () => {
render(<Component />)
expect(screen.getByRole('heading')).toHaveTextContent('Hello')
})