File size: 421 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * @jest-environment jsdom
 */
import React from 'react'
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()
    })
  })
})