rsnext/test/unit/next-dynamic.test.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
386 B
TypeScript
Raw Normal View History

/**
* @jest-environment jsdom
*/
import React from 'react'
import { act, render } from '@testing-library/react'
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()
})
})
})