Skip to content
Myr

ignore ETAG query test as well, reuse skip util (#5639)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jon Church · committed by GitHub · parent 8417c60 · Browse files · 3 files+23 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+23 added−16 removed

  • tests:+23 added−16 removed

3 files+23 added−16 removed

modified:test/support/utils.js+18 added
modified:test/app.router.js+2 added-16 removed
4 unmodified lines
5 , request = require('supertest')6 , assert = require('assert')7 , methods = require('methods');89var shouldSkipQuery = require('./support/utils').shouldSkipQuery1011describe('app.router', function(){12 it('should restore req.params after leaving router', function(done){13 var app = express();14 var router = new express.Router();
21 unmodified lines
36 .expect(200, '1', done);37 })3839 describe('methods', function(){38 function getMajorVersion(versionString) {39 return versionString.split('.')[0];40 }4142 function shouldSkipQuery(versionString) {43 // Temporarily skipping this test on 21 and 2244 // update this implementation to run on those release lines on supported versions once they exist45 // upstream tracking https://github.com/nodejs/node/pull/5171946 // express tracking issue: https://github.com/expressjs/express/issues/561547 var majorsToSkip = {48 "21": true,49 "22": true50 }51 return majorsToSkip[getMajorVersion(versionString)]52 }5340 methods.concat('del').forEach(function(method){41 if (method === 'connect') return;42 if (method === 'query' && shouldSkipQuery(process.versions.node)) return43
1071 unmodified lines
modified:test/res.send.js+3 added
5 unmodified lines
6var methods = require('methods');7var request = require('supertest');8var utils = require('./support/utils');910var shouldSkipQuery = require('./support/utils').shouldSkipQuery1112describe('res', function(){13 describe('.send()', function(){14 it('should set body to ""', function(done){15 var app = express();
392 unmodified lines
408 });409410 methods.forEach(function (method) {411 if (method === 'connect') return;412 if (method === 'query' && shouldSkipQuery(process.versions.node)) return413414 it('should send ETag in response to ' + method.toUpperCase() + ' request', function (done) {415 var app = express();416
183 unmodified lines