/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
test/e2e/app-dir/binary/rsc-binary.test.ts
30 строк
801 B
Sebastian "Sebbie" Silbermann
Match peer dependencies in rsc-binary tests (#69515)
03 сен 2024, 18:50
Не верифицирован
03 сен 2024, 18:50
3ff93d9
Код
Авторство
О чём код?
import { nextTestSetup } from 'e2e-utils' import { check } from 'next-test-utils' describe('RSC binary serialization', () => { const { next, skipped } = nextTestSetup({ files: __dirname, skipDeployment: true, dependencies: { 'server-only': 'latest', }, }) if (skipped) return afterEach(async () => { await next.stop() }) it('should correctly encode/decode binaries and hydrate', async function () { const browser = await next.browser('/') await check(async () => { const content = await browser.elementByCss('body').text() return content.includes('utf8 binary: hello') && content.includes('arbitrary binary: 255,0,1,2,3') && content.includes('hydrated: true') ? 'success' : 'fail' }, 'success') }) })