@@ -822,7 +822,7 @@ describe('RedirectsMiddleware', () => {
822
822
request : {
823
823
nextUrl : {
824
824
pathname : '/not-found' ,
825
- search : 'abc=def ' ,
825
+ search : '' ,
826
826
href : 'http://localhost:3000/not-found' ,
827
827
locale : 'en' ,
828
828
origin : 'http://localhost:3000' ,
@@ -1361,57 +1361,6 @@ describe('RedirectsMiddleware', () => {
1361
1361
expect ( finalRes . status ) . to . equal ( res . status ) ;
1362
1362
} ) ;
1363
1363
1364
- it ( 'should return 301 redirect when queryString is ordered by alphabetic(Netlify feature)' , async ( ) => {
1365
- const cloneUrl = ( ) => Object . assign ( { } , req . nextUrl ) ;
1366
- const url = {
1367
- clone : cloneUrl ,
1368
- href : 'http://localhost:3000/found?a=1&w=1' ,
1369
- locale : 'en' ,
1370
- origin : 'http://localhost:3000' ,
1371
- search : '?a=1&w=1' ,
1372
- pathname : '/found' ,
1373
- } ;
1374
-
1375
- const { res, req } = createTestRequestResponse ( {
1376
- response : { url } ,
1377
- request : {
1378
- nextUrl : {
1379
- pathname : '/not-found/' ,
1380
- search : '?a=1&w=1' ,
1381
- href : 'http://localhost:3000/not-found/?a=1&w=1' ,
1382
- locale : 'en' ,
1383
- origin : 'http://localhost:3000' ,
1384
- clone : cloneUrl ,
1385
- } ,
1386
- } ,
1387
- } ) ;
1388
- setupRedirectStub ( 301 ) ;
1389
-
1390
- const { finalRes, fetchRedirects, siteResolver } = await runTestWithRedirect (
1391
- {
1392
- pattern : '/not-found?w=1&a=1' ,
1393
- target : '/found' ,
1394
- redirectType : REDIRECT_TYPE_301 ,
1395
- isQueryStringPreserved : true ,
1396
- locale : 'en' ,
1397
- } ,
1398
- req
1399
- ) ;
1400
-
1401
- validateEndMessageDebugLog ( 'redirects middleware end in %dms: %o' , {
1402
- headers : { } ,
1403
- redirected : undefined ,
1404
- status : 301 ,
1405
- url,
1406
- } ) ;
1407
-
1408
- expect ( siteResolver . getByHost ) . to . be . calledWith ( hostname ) ;
1409
- // eslint-disable-next-line no-unused-expressions
1410
- expect ( fetchRedirects . called ) . to . be . true ;
1411
- expect ( finalRes ) . to . deep . equal ( res ) ;
1412
- expect ( finalRes . status ) . to . equal ( res . status ) ;
1413
- } ) ;
1414
-
1415
1364
it ( 'should return 301 redirect when pattern has special symbols "?"' , async ( ) => {
1416
1365
const cloneUrl = ( ) => Object . assign ( { } , req . nextUrl ) ;
1417
1366
const url = {
0 commit comments