mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
13 lines
376 B
React
13 lines
376 B
React
/**
|
|
* @jest-environment jsdom
|
|
*/
|
|
import { fireEvent, render, screen } from '@testing-library/react'
|
|
import Component from './component'
|
|
|
|
it('works with client-only code', () => {
|
|
render(<Component />)
|
|
expect(screen.getByRole('heading')).toHaveTextContent('0')
|
|
fireEvent.click(screen.getByRole('button'))
|
|
expect(screen.getByRole('heading')).toHaveTextContent('1')
|
|
})
|