From 604cde5d4b3d9afb6371d7831931229cd2b242f6 Mon Sep 17 00:00:00 2001 From: Carlos Fuentes Date: Wed, 10 Jan 2024 10:57:22 +0100 Subject: [PATCH] test: disable following redirection --- 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')],