From 8417c60fcfd7a9523e8783fd3f489d771df1ce44 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 4 May 2024 17:09:52 -0400 Subject: [PATCH] skip QUERY method test (#5628) --- test/app.router.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/app.router.js b/test/app.router.js index 12b6c1fa..d9ddc69a 100644 --- a/test/app.router.js +++ b/test/app.router.js @@ -35,8 +35,25 @@ describe('app.router', function(){ }) describe('methods', function(){ + function getMajorVersion(versionString) { + return versionString.split('.')[0]; + } + + function shouldSkipQuery(versionString) { + // Temporarily skipping this test on 21 and 22 + // update this implementation to run on those release lines on supported versions once they exist + // upstream tracking https://github.com/nodejs/node/pull/51719 + // express tracking issue: https://github.com/expressjs/express/issues/5615 + var majorsToSkip = { + "21": true, + "22": true + } + return majorsToSkip[getMajorVersion(versionString)] + } + methods.concat('del').forEach(function(method){ if (method === 'connect') return; + if (method === 'query' && shouldSkipQuery(process.versions.node)) return it('should include ' + method.toUpperCase(), function(done){ var app = express();