/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
test/unit/link-rendering.test.ts
20 строк
484 B
Balázs Orbán
chore: upgrade `jest` (#56909)
19 окт 2023, 20:38
Не верифицирован
19 окт 2023, 20:38
33db463
Код
Авторство
О чём код?
/* 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>"` ) }) })