/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
test/development/dev-cache-control-no-cache/dev-cache-control-no-cache.test.ts
17 строк
535 B
Tobias Koppers
Remove devCacheControlNoCache experimental option (hard-code no-cache) (#91503)
17 мар 2026, 22:13
Не верифицирован
17 мар 2026, 22:13
4494261
Код
Авторство
О чём код?
import { nextTestSetup } from 'e2e-utils' describe('dev Cache-Control header', () => { const { next } = nextTestSetup({ files: __dirname, }) it('should use no-cache for pages router', async () => { const res = await next.fetch('/pages-route') expect(res.headers.get('Cache-Control')).toBe('no-cache, must-revalidate') }) it('should use no-cache for app router', async () => { const res = await next.fetch('/app-route') expect(res.headers.get('Cache-Control')).toBe('no-cache, must-revalidate') }) })