Skip to content

Commit 8417c60

Browse files
authored
skip QUERY method test (#5628)
1 parent bf91946 commit 8417c60

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: test/app.router.js

+17
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,25 @@ describe('app.router', function(){
3535
})
3636

3737
describe('methods', function(){
38+
function getMajorVersion(versionString) {
39+
return versionString.split('.')[0];
40+
}
41+
42+
function shouldSkipQuery(versionString) {
43+
// Temporarily skipping this test on 21 and 22
44+
// update this implementation to run on those release lines on supported versions once they exist
45+
// upstream tracking https://github.com/nodejs/node/pull/51719
46+
// express tracking issue: https://github.com/expressjs/express/issues/5615
47+
var majorsToSkip = {
48+
"21": true,
49+
"22": true
50+
}
51+
return majorsToSkip[getMajorVersion(versionString)]
52+
}
53+
3854
methods.concat('del').forEach(function(method){
3955
if (method === 'connect') return;
56+
if (method === 'query' && shouldSkipQuery(process.versions.node)) return
4057

4158
it('should include ' + method.toUpperCase(), function(done){
4259
var app = express();

0 commit comments

Comments
 (0)