Files
next.js/test/e2e/app-dir/no-duplicate-headers-middleware/no-duplicate-headers-middleware.test.ts
JJ KasperandGitHub a675bde6c7 Update no duplicate headers case (#70381)
This header isn't always able to be overridden so we shouldn't be
asserting it specifically in our tests.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1727138501597279?thread_ts=1727137032.335159&cid=C04KC8A53T7)
2024-09-23 18:12:20 -07:00

14 lines
394 B
TypeScript

import { nextTestSetup } from 'e2e-utils'
describe('no-duplicate-headers-next-config', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should prioritise headers in middleware for static assets', async () => {
const res = await next.fetch('favicon.ico')
expect(res.status).toBe(200)
expect(res.headers.get('cache-control')).toBe('max-age=1234')
})
})