rsnext/test/unit/next-dynamic.test.tsx
JJ Kasper 005b13f1ac
Move unit tests to one folder and migrate them to TypeScript (#28427)
* Move unit tests to one folder

* Migrate unit tests to TypeScript

* add test types to lint

* Ensure ts(x) tests are run with util

* Add tsx extension to jest config

* bump
2021-08-24 07:52:45 -05:00

16 lines
385 B
TypeScript

/**
* @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()
})
})
})