mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Port the unit tests from https://github.com/vercel/nft/tree/941be1cb3b9d38fbc99a8a6f07af568a64ed0f12/test/unit
8 lines
234 B
JavaScript
8 lines
234 B
JavaScript
const React = require('react')
|
|
const { renderToString } = require('react-dom/server')
|
|
|
|
const html = renderToString(React.createElement('h1'))
|
|
if (html !== '<h1 data-reactroot=""></h1>') {
|
|
throw new Error('Bad react SSR: ' + html)
|
|
}
|