Skip to content

fix(test): pin supertest to 7.3.0 to avoid 7.3.1 regression - #773

Merged
UlisesGascon merged 1 commit into
expressjs:masterfrom
saadkhantareen:fix/pin-supertest-730
Oct 15, 2026
Merged

UlisesGascon merged 1 commit into
expressjs:masterfrom
saadkhantareen:fix/pin-supertest-730

Conversation

@saadkhantareen

Copy link
Copy Markdown
Contributor

Summary

supertest@7.3.1 contains a regression that breaks this repository's test suite, as reported in #772. The ^7.2.2 range in devDependencies now resolves to 7.3.1, so a fresh install fails even though no library code has changed. No fixed supertest release is available yet (7.3.1 is still the latest release), so this pins supertest to 7.3.0, the last known working version, as suggested in #772. The pin can be lifted once a fixed supertest release is published.

The failing tests are the ones that stream a body with .write() on the request (for example the charset and chunked-encoding cases): with 7.3.1 they fail with Error: ECONNREFUSED: Connection refused from supertest's server handling, while the same tests pass on 7.3.0.

Changes

  • package.json: change the supertest devDependency from ^7.2.2 to the exact version 7.3.0, so fresh installs no longer resolve to the regressed 7.3.1 release.

Tests

Baseline, with supertest@7.3.1 installed:

  • npx mocha --reporter spec test/json.js - 39 passing, 27 failing (all failures are Error: ECONNREFUSED: Connection refused in tests using .write())

With supertest@7.3.0 pinned by this change:

  • npx mocha --reporter dot --check-leaks test/ - 273 passing, 4 pending, 0 failing
  • npm run lint - passed

Fixes #772

Copilot AI balanced review requested due to automatic review settings October 15, 2026 10:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​supertest@​7.3.1 ⏵ 7.3.09910010091 -3100

View full report

@UlisesGascon UlisesGascon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@UlisesGascon
UlisesGascon merged commit 02101da into expressjs:master Oct 15, 2026
37 checks passed
@UlisesGascon UlisesGascon mentioned this pull request Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure in Node.js citgm regression testing

3 participants