skip QUERY method test (#5628)

This commit is contained in:
Jon Church 2024-05-04 17:09:52 -04:00 committed by GitHub
parent bf91946bd4
commit 8417c60fcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();