Skip to content

Commit d3d825e

Browse files
authored
test: disable following redirection (#2607)
1 parent 66a103c commit d3d825e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/fixtures/undici.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { request } = require('../..')
22

3-
request('https://nodejs.org', { maxRedirections: 1 }).then(
3+
request('https://nodejs.org', { maxRedirections: 0 }).then(
44
res => res.body.dump(),
55
() => {}
66
)

test/node-test/debug.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
const { test } = require('node:test')
44
const { spawn } = require('node:child_process')
5-
const { tspl } = require('@matteo.collina/tspl')
65
const { join } = require('node:path')
6+
const { tspl } = require('@matteo.collina/tspl')
77

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

6565
test('debug#undici', async t => {
6666
// Due to Node.js webpage redirect
67-
const assert = tspl(t, { plan: 10 })
67+
const assert = tspl(t, { plan: 5 })
6868
const child = spawn(
6969
process.execPath,
7070
[join(__dirname, '../fixtures/undici.js')],

0 commit comments

Comments
 (0)