Skip to content

[fix] .timeout(x) doesn't wait before aborting the request on node.js 26.3.0 on linux #891

Description

@nfriedly

Describe the bug

Node.js version: 26.3.0 (It worked on 26.2.0 and older)

OS version: ubuntu-latest on github actions, also the latest code-server docker image (also ubuntu) on Unraid 7.2.6 (Linux kernel 6.12.87)

Github actions has it passing on macOS. It skipped windows because linux failed before windows finished, and I don't have a windows machine handy right now to test it myself :/

Description: I'm seeing a consistent failure in my test that uses an express endpoint that drops the request and relies on supertest's .timeout(x) method to end the request.

On earlier node.js versions, calling request(app).get('/whatever').timeout(n) would send the request and only throw/reject if n milliseconds passed. Starting with node.js 26.3.0 on linux, the timeout now triggers immediately, and the request is never sent, which causes my test to fail.

It's possible that this is a node.js bug, but since I'm only seeing it with supertest, I figured I'd report it here first.

Actual behavior

.timeout(n) aborts the request immediately without even calling the server endpoint. (On node 26.3.0 on linux)

Expected behavior

.timeout(n) waits n milliseconds for the request to complete, and only aborts if it doesn't complete within that time frame.

Code to reproduce

git clone https://github.com/express-rate-limit/express-rate-limit.git
cd express-rate-limit
npx pnpm install
npx jest test/library/middleware-test.ts -t "response closes"

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.

Activity

  1. titanism commented on Sep 22, 2026

    @titanism
    Collaborator

    version v7.3.0 now available via npm, see https://github.com/forwardemail/supertest/releases/tag/v7.3.0 and 71dc5fb

    please consider supporting our open source maintenance efforts by using our 100% open source email service at https://forwardemail.net 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions