Skip to content

Commit

Permalink
skip QUERY method test (#5628)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchurch committed May 4, 2024
1 parent bf91946 commit 8417c60
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/app.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8417c60

Please sign in to comment.