Skip to content

Commit 1a9932b

Browse files
committed
update vary test
1 parent 9203f80 commit 1a9932b

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

test/e2e/vary-header/test/index.test.ts

+2-12
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,16 @@ describe('Vary Header Tests', () => {
1212
expect(res.headers.get('vary')).toContain('Custom-Header')
1313
})
1414

15-
it('should preserve custom vary header and append RSC headers in app route handlers', async () => {
15+
it('should preserve custom vary header', async () => {
1616
const res = await next.fetch('/normal')
1717
const varyHeader = res.headers.get('vary')
1818

1919
// Custom header is preserved
2020
expect(varyHeader).toContain('User-Agent')
2121
expect(res.headers.get('cache-control')).toBe('s-maxage=3600')
22-
23-
// Next.js internal headers are appended
24-
expect(varyHeader).toContain('RSC')
25-
expect(varyHeader).toContain('Next-Router-State-Tree')
26-
expect(varyHeader).toContain('Next-Router-Prefetch')
2722
})
2823

29-
it('should preserve middleware vary header in combination with route handlers', async () => {
24+
it('should preserve middleware vary header', async () => {
3025
const res = await next.fetch('/normal')
3126
const varyHeader = res.headers.get('vary')
3227
const customHeader = res.headers.get('my-custom-header')
@@ -37,10 +32,5 @@ describe('Vary Header Tests', () => {
3732
// Both middleware and route handler vary headers are preserved
3833
expect(varyHeader).toContain('my-custom-header')
3934
expect(varyHeader).toContain('User-Agent')
40-
41-
// Next.js internal headers are still present
42-
expect(varyHeader).toContain('RSC')
43-
expect(varyHeader).toContain('Next-Router-State-Tree')
44-
expect(varyHeader).toContain('Next-Router-Prefetch')
4535
})
4636
})

0 commit comments

Comments
 (0)