Skip to content

Conversation

@bizob2828
Copy link
Member

Description

We missed some logic in shim that wraps a middleware mounter. Middleware can be defined as an array on the 2nd arg to a router.

router.get('/path', [mw1, mw2, handler]);

This PR adds the missing logic to handle this case.

Related Issues

Closes #3472

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.65%. Comparing base (3b3ab72) to head (1a236aa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3473      +/-   ##
==========================================
- Coverage   97.75%   97.65%   -0.11%     
==========================================
  Files         414      414              
  Lines       55577    55587      +10     
  Branches        1        1              
==========================================
- Hits        54330    54282      -48     
- Misses       1247     1305      +58     
Flag Coverage Δ
integration-tests-cjs-20.x 73.33% <0.00%> (-0.02%) ⬇️
integration-tests-cjs-22.x 73.37% <0.00%> (?)
integration-tests-cjs-24.x 74.14% <0.00%> (?)
integration-tests-esm-20.x 51.82% <0.00%> (-0.02%) ⬇️
integration-tests-esm-22.x 51.87% <0.00%> (-0.02%) ⬇️
integration-tests-esm-24.x 53.08% <0.00%> (-0.02%) ⬇️
unit-tests-20.x 88.75% <0.00%> (-0.02%) ⬇️
unit-tests-22.x 88.79% <0.00%> (?)
unit-tests-24.x 88.80% <0.00%> (?)
versioned-tests-20.x 81.11% <100.00%> (-0.32%) ⬇️
versioned-tests-22.x 81.12% <100.00%> (-0.32%) ⬇️
versioned-tests-24.x 81.05% <100.00%> (-0.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bizob2828 bizob2828 merged commit e383c4e into newrelic:main Oct 28, 2025
69 of 76 checks passed
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done: Issues recently completed in Node.js Engineering Board Oct 28, 2025
@bizob2828 bizob2828 deleted the array-of-routes branch October 28, 2025 23:00
@github-actions github-actions bot mentioned this pull request Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done: Issues recently completed

Development

Successfully merging this pull request may close these issues.

Not instrumenting an array of middleware handlers in express

2 participants