2020-06-23 22:46:40 +02:00
|
|
|
/* 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,
|
|
|
|
{},
|
2021-08-24 14:52:45 +02:00
|
|
|
React.createElement(Head),
|
2020-06-23 22:46:40 +02:00
|
|
|
React.createElement('p', {}, 'hello world')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
expect(html).toContain('hello world')
|
|
|
|
})
|
|
|
|
})
|