silverwolf-x/project / test /unit /link-rendering.test.ts
silverwolf-x's picture
download
raw
484 Bytes
/* eslint-env jest */
import React from 'react'
import ReactDOM from 'react-dom/server'
import Link from 'next/link'
describe('Link rendering', () => {
it('should render Link on its own', async () => {
const element = React.createElement(
Link,
{
href: '/my-path',
},
'to another page'
)
const html = ReactDOM.renderToString(element)
expect(html).toMatchInlineSnapshot(
`"<a href="/my-path">to another page</a>"`
)
})
})

Xet Storage Details

Size:
484 Bytes
·
Xet hash:
1f794ff2e58024c37790ff31439d84c7149c03d1a0a6f675c9f9a5494d4adb43

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.