2021-06-28 15:23:14 +02:00
|
|
|
/**
|
|
|
|
* @jest-environment jsdom
|
|
|
|
*/
|
|
|
|
import React from 'react'
|
|
|
|
import { act, render } from '@testing-library/react'
|
|
|
|
import dynamic from 'next/dynamic'
|
|
|
|
|
|
|
|
describe('next/dynamic', () => {
|
2021-08-13 23:08:45 +02:00
|
|
|
it('test dynamic with jest', () => {
|
2021-06-28 15:23:14 +02:00
|
|
|
const App = dynamic(() => import('./fixtures/stub-components/hello'))
|
|
|
|
act(() => {
|
|
|
|
const { unmount } = render(<App />)
|
|
|
|
unmount()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|