/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
test/development/acceptance/ReactRefreshModule.test.ts
39 строк
1 KB
Sebastian "Sebbie" Silbermann
[test] `assert*` -> `waitFor*` when the util is not instant (#85450)
30 окт 2025, 16:44
Не верифицирован
30 окт 2025, 16:44
0b58a32
Код
Авторство
О чём код?
import { FileRef, nextTestSetup } from 'e2e-utils' import { createSandbox } from 'development-sandbox' import path from 'path' describe('ReactRefreshModule', () => { const { next } = nextTestSetup({ files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')), skipStart: true, }) it('should allow any variable names', async () => { await using sandbox = await createSandbox(next) const { session } = sandbox await session.waitForNoRedbox() const variables = [ '_a', '_b', 'currentExports', 'prevExports', 'isNoLongerABoundary', ] for await (const variable of variables) { await session.patch( 'pages/index.js', `import { default as ${variable} } from 'next/link' console.log({ ${variable} }) export default function Page() { return null }` ) await session.waitForNoRedbox() expect(next.cliOutput).not.toContain( `'${variable}' has already been declared` ) } }) })