File size: 477 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 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')
  })
})