Skip to content

Commit

Permalink
test: disable following redirection (#2607)
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 authored Jan 10, 2024
1 parent 66a103c commit d3d825e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/undici.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { request } = require('../..')

request('https://nodejs.org', { maxRedirections: 1 }).then(
request('https://nodejs.org', { maxRedirections: 0 }).then(
res => res.body.dump(),
() => {}
)
4 changes: 2 additions & 2 deletions test/node-test/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

const { test } = require('node:test')
const { spawn } = require('node:child_process')
const { tspl } = require('@matteo.collina/tspl')
const { join } = require('node:path')
const { tspl } = require('@matteo.collina/tspl')

test('debug#websocket', async t => {
const assert = tspl(t, { plan: 5 })
Expand Down Expand Up @@ -64,7 +64,7 @@ test('debug#fetch', async t => {

test('debug#undici', async t => {
// Due to Node.js webpage redirect
const assert = tspl(t, { plan: 10 })
const assert = tspl(t, { plan: 5 })
const child = spawn(
process.execPath,
[join(__dirname, '../fixtures/undici.js')],
Expand Down

0 comments on commit d3d825e

Please sign in to comment.