Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip QUERY method test #5628

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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