005b13f1ac
* 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
16 lines
385 B
TypeScript
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()
|
|
})
|
|
})
|
|
})
|