Skip to content

Commit

Permalink
fix: use local server for redirect node-fetch test
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Apr 12, 2023
1 parent ca219fd commit 69e08a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/node-fetch/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1648,15 +1648,15 @@ describe('node-fetch', () => {

it('should allow manual redirect handling', function () {
this.timeout(5000)
const url = 'https://httpbin.org/status/302'
const url = `${base}redirect/302`
const options = {
redirect: 'manual'
}
return fetch(url, options).then(res => {
expect(res.status).to.equal(302)
expect(res.url).to.equal(url)
expect(res.type).to.equal('basic')
expect(res.headers.get('Location')).to.equal('/redirect/1')
expect(res.headers.get('Location')).to.equal('/inspect')
expect(res.ok).to.be.false
})
})
Expand Down

0 comments on commit 69e08a5

Please sign in to comment.