Skip to content

Commit 124d4ae

Browse files
authored
test: added tests to check that the vary header contains 'RSC' (#1993)
1 parent d4cd121 commit 124d4ae

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

cypress/integration/default/appdir.spec.ts

+21
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,27 @@ describe('appDir', () => {
2929
})
3030
})
3131

32+
it('returns a vary header for RSC data requests to ISR pages', () => {
33+
cy.request({
34+
url: '/blog/erica/',
35+
followRedirect: false,
36+
headers: {
37+
RSC: '1',
38+
},
39+
}).then((response) => {
40+
expect(response.headers).to.have.property('vary').contains('RSC')
41+
})
42+
})
43+
44+
it('returns a vary header for non-RSC data requests to ISR pages', () => {
45+
cy.request({
46+
url: '/blog/erica/',
47+
followRedirect: false,
48+
}).then((response) => {
49+
expect(response.headers).to.have.property('vary').contains('RSC')
50+
})
51+
})
52+
3253
it('returns RSC data for RSC requests to static pages', () => {
3354
cy.request({
3455
url: '/blog/erica/first-post/',

0 commit comments

Comments
 (0)