From d3d825e21ddea12b893bbf7ba0a4c1e5899c85e4 Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Wed, 10 Jan 2024 16:35:39 +0100 Subject: [PATCH] test: disable following redirection (#2607) --- test/fixtures/undici.js | 2 +- test/node-test/debug.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/fixtures/undici.js b/test/fixtures/undici.js index 51aac6bf943..d322fcf7846 100644 --- a/test/fixtures/undici.js +++ b/test/fixtures/undici.js @@ -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(), () => {} ) diff --git a/test/node-test/debug.js b/test/node-test/debug.js index 76b7405f261..caebbaf126d 100644 --- a/test/node-test/debug.js +++ b/test/node-test/debug.js @@ -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 }) @@ -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')],