Skip to content

Commit ef41607

Browse files
authored
re-enable middleware deploy tests (#73744)
This was fixed upstream, so we can re-enable the deployment tests for it.
1 parent 16bfce6 commit ef41607

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

test/e2e/app-dir/app-middleware/app-middleware.test.ts

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { nextTestSetup, FileRef } from 'e2e-utils'
66
import type { Response } from 'node-fetch'
77

88
describe('app-dir with middleware', () => {
9-
const { next, isNextDeploy } = nextTestSetup({
9+
const { next } = nextTestSetup({
1010
files: __dirname,
1111
})
1212

@@ -187,28 +187,25 @@ describe('app-dir with middleware', () => {
187187
await browser.deleteCookies()
188188
})
189189

190-
// TODO: Re-enable this test in deploy mode once Vercel has proper handling
191-
if (!isNextDeploy) {
192-
it('should omit internal headers for middleware cookies', async () => {
193-
const response = await next.fetch('/rsc-cookies/cookie-options')
194-
expect(response.status).toBe(200)
195-
expect(response.headers.get('x-middleware-set-cookie')).toBeNull()
196-
})
190+
it('should omit internal headers for middleware cookies', async () => {
191+
const response = await next.fetch('/rsc-cookies/cookie-options')
192+
expect(response.status).toBe(200)
193+
expect(response.headers.get('x-middleware-set-cookie')).toBeNull()
194+
})
197195

198-
it('should ignore x-middleware-set-cookie as a request header', async () => {
199-
const $ = await next.render$(
200-
'/cookies',
201-
{},
202-
{
203-
headers: {
204-
'x-middleware-set-cookie': 'test',
205-
},
206-
}
207-
)
196+
it('should ignore x-middleware-set-cookie as a request header', async () => {
197+
const $ = await next.render$(
198+
'/cookies',
199+
{},
200+
{
201+
headers: {
202+
'x-middleware-set-cookie': 'test',
203+
},
204+
}
205+
)
208206

209-
expect($('#cookies').text()).toBe('cookies: 0')
210-
})
211-
}
207+
expect($('#cookies').text()).toBe('cookies: 0')
208+
})
212209

213210
it('should be possible to read cookies that are set during the middleware handling of a server action', async () => {
214211
const browser = await next.browser('/rsc-cookies')

0 commit comments

Comments
 (0)