Skip to content

Commit 123f653

Browse files
committed
fix(platform-express) respect existing parser middlewares when using Express 5
Express 5 made the router public API again and renamed the field from app._router to app.router. This broke the detection mechanism whether a middleware named "jsonParser" or "urlencodedParser" is already registered or not. Unfortunately, #14574 only fixed the issue partially. This commit now uses app.router everywhere. To avoid future regressions a test was added to verify the expected behavior.
1 parent eff8f15 commit 123f653

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/platform-express/test/adapters/express-adapter.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as sinon from 'sinon';
55

66
afterEach(() => sinon.restore());
77

8-
describe.only('ExpressAdapter', () => {
8+
describe('ExpressAdapter', () => {
99
describe('registerParserMiddleware', () => {
1010
it('should register the express built-in parsers for json and urlencoded payloads', () => {
1111
const expressInstance = express();

0 commit comments

Comments
 (0)