@@ -6,7 +6,7 @@ import { nextTestSetup, FileRef } from 'e2e-utils'
6
6
import type { Response } from 'node-fetch'
7
7
8
8
describe ( 'app-dir with middleware' , ( ) => {
9
- const { next, isNextDeploy } = nextTestSetup ( {
9
+ const { next } = nextTestSetup ( {
10
10
files : __dirname ,
11
11
} )
12
12
@@ -187,28 +187,25 @@ describe('app-dir with middleware', () => {
187
187
await browser . deleteCookies ( )
188
188
} )
189
189
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
+ } )
197
195
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
+ )
208
206
209
- expect ( $ ( '#cookies' ) . text ( ) ) . toBe ( 'cookies: 0' )
210
- } )
211
- }
207
+ expect ( $ ( '#cookies' ) . text ( ) ) . toBe ( 'cookies: 0' )
208
+ } )
212
209
213
210
it ( 'should be possible to read cookies that are set during the middleware handling of a server action' , async ( ) => {
214
211
const browser = await next . browser ( '/rsc-cookies' )
0 commit comments