@@ -6,6 +6,7 @@ import webdriver from 'next-webdriver'
6
6
import { NextInstance } from 'test/lib/next-modes/base'
7
7
import { check , fetchViaHTTP , waitFor } from 'next-test-utils'
8
8
import { createNext , FileRef } from 'e2e-utils'
9
+ const mostlySkip = process . env . RUN_ALL_TESTS === 'true' ? it : it . skip
9
10
10
11
const urlsError = 'Please use only absolute URLs'
11
12
@@ -140,7 +141,7 @@ describe('Middleware Runtime', () => {
140
141
} )
141
142
}
142
143
// NTL Fail
143
- it . skip ( 'passes search params with rewrites' , async ( ) => {
144
+ mostlySkip ( 'passes search params with rewrites' , async ( ) => {
144
145
const response = await fetchViaHTTP ( next . url , `/api/edge-search-params` , {
145
146
a : 'b' ,
146
147
} )
@@ -258,7 +259,7 @@ describe('Middleware Runtime', () => {
258
259
expect ( await browser . elementByCss ( '#as-path' ) . text ( ) ) . toBe ( '/rewrite-to-config-rewrite' )
259
260
} )
260
261
// NTL Fail
261
- it . skip ( 'should have correct route params for rewrite from config dynamic route' , async ( ) => {
262
+ mostlySkip ( 'should have correct route params for rewrite from config dynamic route' , async ( ) => {
262
263
const browser = await webdriver ( next . url , '/' )
263
264
await browser . eval ( 'window.beforeNav = 1' )
264
265
await browser . eval ( 'window.next.router.push("/rewrite-3")' )
@@ -275,7 +276,7 @@ describe('Middleware Runtime', () => {
275
276
expect ( await browser . elementByCss ( '#as-path' ) . text ( ) ) . toBe ( '/rewrite-3' )
276
277
} )
277
278
// NTL Fail
278
- it . skip ( 'should have correct route params for rewrite from config non-dynamic route' , async ( ) => {
279
+ mostlySkip ( 'should have correct route params for rewrite from config non-dynamic route' , async ( ) => {
279
280
const browser = await webdriver ( next . url , '/' )
280
281
await browser . eval ( 'window.beforeNav = 1' )
281
282
await browser . eval ( 'window.next.router.push("/rewrite-1")' )
@@ -287,7 +288,7 @@ describe('Middleware Runtime', () => {
287
288
} )
288
289
} )
289
290
// NTL Fail
290
- it . skip ( 'should redirect the same for direct visit and client-transition' , async ( ) => {
291
+ mostlySkip ( 'should redirect the same for direct visit and client-transition' , async ( ) => {
291
292
const res = await fetchViaHTTP ( next . url , `/redirect-1` , undefined , {
292
293
redirect : 'manual' ,
293
294
} )
@@ -302,7 +303,7 @@ describe('Middleware Runtime', () => {
302
303
} , 'success' )
303
304
} )
304
305
// NTL Fail
305
- it . skip ( 'should rewrite the same for direct visit and client-transition' , async ( ) => {
306
+ mostlySkip ( 'should rewrite the same for direct visit and client-transition' , async ( ) => {
306
307
const res = await fetchViaHTTP ( next . url , `/rewrite-1` )
307
308
expect ( res . status ) . toBe ( 200 )
308
309
expect ( await res . text ( ) ) . toContain ( 'Hello World' )
@@ -317,7 +318,7 @@ describe('Middleware Runtime', () => {
317
318
expect ( await browser . eval ( 'window.beforeNav' ) ) . toBe ( 1 )
318
319
} )
319
320
// NTL Fail
320
- it . skip ( 'should rewrite correctly for non-SSG/SSP page' , async ( ) => {
321
+ mostlySkip ( 'should rewrite correctly for non-SSG/SSP page' , async ( ) => {
321
322
const res = await fetchViaHTTP ( next . url , `/rewrite-2` )
322
323
expect ( res . status ) . toBe ( 200 )
323
324
expect ( await res . text ( ) ) . toContain ( 'AboutA' )
@@ -351,7 +352,7 @@ describe('Middleware Runtime', () => {
351
352
} )
352
353
}
353
354
// NTL Fail
354
- it . skip ( 'should contain process polyfill' , async ( ) => {
355
+ mostlySkip ( 'should contain process polyfill' , async ( ) => {
355
356
const res = await fetchViaHTTP ( next . url , `/global` )
356
357
expect ( readMiddlewareJSON ( res ) ) . toEqual ( {
357
358
process : {
@@ -389,7 +390,7 @@ describe('Middleware Runtime', () => {
389
390
} )
390
391
}
391
392
// Fail
392
- it . skip ( `should allow to abort a fetch request` , async ( ) => {
393
+ mostlySkip ( `should allow to abort a fetch request` , async ( ) => {
393
394
const response = await fetchViaHTTP ( next . url , '/abort-controller' )
394
395
const payload = readMiddlewareJSON ( response )
395
396
expect ( 'error' in payload ) . toBe ( true )
0 commit comments