@@ -1532,12 +1532,12 @@ describe('node-fetch', () => {
15321532 } )
15331533 } )
15341534
1535- it ( 'should keep `?` sign in URL when no params are given' , ( ) => {
1535+ it ( 'should NOT keep `?` sign in URL when no params are given' , ( ) => {
15361536 const url = `${ base } question?`
15371537 const urlObject = new URL ( url )
15381538 const request = new Request ( urlObject )
15391539 return fetch ( request ) . then ( res => {
1540- expect ( res . url ) . to . equal ( url )
1540+ expect ( res . url ) . to . equal ( url . slice ( 0 , - 1 ) )
15411541 expect ( res . ok ) . to . be . true
15421542 expect ( res . status ) . to . equal ( 200 )
15431543 } )
@@ -1554,12 +1554,12 @@ describe('node-fetch', () => {
15541554 } )
15551555 } )
15561556
1557- it ( 'should preserve the hash (#) symbol' , ( ) => {
1557+ it ( 'should NOT preserve the hash (#) symbol' , ( ) => {
15581558 const url = `${ base } question?#`
15591559 const urlObject = new URL ( url )
15601560 const request = new Request ( urlObject )
15611561 return fetch ( request ) . then ( res => {
1562- expect ( res . url ) . to . equal ( url )
1562+ expect ( res . url ) . to . equal ( url . slice ( 0 , - 2 ) )
15631563 expect ( res . ok ) . to . be . true
15641564 expect ( res . status ) . to . equal ( 200 )
15651565 } )
0 commit comments