mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
18 lines
395 B
TypeScript
18 lines
395 B
TypeScript
/**
|
|
* @jest-environment jsdom
|
|
*/
|
|
import { act, render } from '@testing-library/react'
|
|
import '@testing-library/jest-dom'
|
|
import dynamic from 'next/dynamic'
|
|
|
|
describe('next/dynamic', () => {
|
|
it('test dynamic with jest', () => {
|
|
const App = dynamic(() => import('./fixtures/stub-components/hello'))
|
|
|
|
act(() => {
|
|
const { unmount } = render(<App />)
|
|
unmount()
|
|
})
|
|
})
|
|
})
|