mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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.
12 lines
278 B
React
12 lines
278 B
React
/**
|
|
* @jest-environment jsdom
|
|
*/
|
|
import { render, screen } from '@testing-library/react'
|
|
import '@testing-library/jest-dom'
|
|
import Page from './page'
|
|
|
|
it('works with client-only code', () => {
|
|
render(<Page />)
|
|
expect(screen.getByTestId('log')).toHaveTextContent('log')
|
|
})
|