mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 00:19:48 +01:00
skip QUERY method test (#5628)
This commit is contained in:
parent
bf91946bd4
commit
8417c60fcf
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user