mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Disable server components and server actions SWC transform when it's running jest. You can only do basic DOM testing like what we described in #54891 instead the server action itself. Closes #53065 Closes NEXT-1473
11 lines
243 B
React
11 lines
243 B
React
/**
|
|
* @jest-environment jsdom
|
|
*/
|
|
import { render, screen } from '@testing-library/react'
|
|
import Page from './page'
|
|
|
|
it('works with client-only code', () => {
|
|
render(<Page />)
|
|
expect(screen.getByTestId('log')).toHaveTextContent('log')
|
|
})
|