Download next.js/test/unit/next-head-rendering.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/unit/next-head-rendering.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/unit/next-head-rendering.test.ts
-
curl -L -o next-head-rendering.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/unit/next-head-rendering.test.ts
477 Bytes
| /* 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') | |
| }) | |
| }) | |