rsnext/test/unit/next-head-rendering.test.ts
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

18 lines
477 B
TypeScript

/* eslint-env jest */
import Head from 'next/head'
import React from 'react'
import ReactDOM from 'react-dom/server'
describe('Rendering next/head', () => {
it('should render outside of Next.js without error', () => {
const html = ReactDOM.renderToString(
React.createElement(
React.Fragment,
{},
React.createElement(Head),
React.createElement('p', {}, 'hello world')
)
)
expect(html).toContain('hello world')
})
})