Skip to content
Myr

lint: remove unused function arguments in tests

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

closes #5124

authored by Rakesh Bisht · committed by Douglas Christopher Wilson · parent 442fd46 · Browse files · 4 files+17 added−17 removed
This commit

State

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

Diff stats

4 files+17 added−17 removed

  • tests:+17 added−17 removed

4 files+17 added−17 removed

modified:test/app.param.js+3 added-3 removed
164 unmodified lines
165166 app.get('/:user', function(req, res, next) {167 next('route');168 });169 app.get('/:user', function(req, res, next) {169 app.get('/:user', function (req, res) {170 res.send(req.params.user);171 });172173 request(app)
12 unmodified lines
186 app.param('user', function(req, res, next, user) {187 next(new Error('invalid invocation'))188 });189190 app.post('/:user', function(req, res, next) {190 app.post('/:user', function (req, res) {191 res.send(req.params.user);192 });193194 app.get('/:thing', function(req, res, next) {194 app.get('/:thing', function (req, res) {195 res.send(req.thing);196 });197198 request(app)
167 unmodified lines
modified:test/app.router.js+11 added-11 removed
88 unmodified lines
89 describe('decode params', function () {90 it('should decode correct params', function(done){91 var app = express();9293 app.get('/:name', function(req, res, next){93 app.get('/:name', function (req, res) {94 res.send(req.params.name);95 });9697 request(app)
3 unmodified lines
101102 it('should not accept params in malformed paths', function(done) {103 var app = express();104105 app.get('/:name', function(req, res, next){105 app.get('/:name', function (req, res) {106 res.send(req.params.name);107 });108109 request(app)
3 unmodified lines
113114 it('should not decode spaces', function(done) {115 var app = express();116117 app.get('/:name', function(req, res, next){117 app.get('/:name', function (req, res) {118 res.send(req.params.name);119 });120121 request(app)
3 unmodified lines
125126 it('should work with unicode', function(done) {127 var app = express();128129 app.get('/:name', function(req, res, next){129 app.get('/:name', function (req, res) {130 res.send(req.params.name);131 });132133 request(app)
775 unmodified lines
909 calls.push('/foo/:bar?');910 next();911 });912913 app.get('/bar', function(req, res){913 app.get('/bar', function () {914 assert(0);915 });916917 app.get('/foo', function(req, res, next){918 calls.push('/foo');919 next();920 });921922 app.get('/foo', function(req, res, next){922 app.get('/foo', function (req, res) {923 calls.push('/foo 2');924 res.json(calls)925 });926
11 unmodified lines
938 res.set('X-Hit', '1')939 next('route')940 }941942 app.get('/foo', fn, function(req, res, next){942 app.get('/foo', fn, function (req, res) {943 res.end('failure')944 });945946 app.get('/foo', function(req, res){
16 unmodified lines
963 res.set('X-Hit', '1')964 next('router')965 }966967 router.get('/foo', fn, function (req, res, next) {967 router.get('/foo', fn, function (req, res) {968 res.end('failure')969 })970971 router.get('/foo', function (req, res, next) {971 router.get('/foo', function (req, res) {972 res.end('failure')973 })974975 app.use(router)
18 unmodified lines
994 calls.push('/foo/:bar?');995 next();996 });997998 app.get('/bar', function(req, res){998 app.get('/bar', function () {999 assert(0);1000 });10011002 app.get('/foo', function(req, res, next){1003 calls.push('/foo');1004 next(new Error('fail'));1005 });10061007 app.get('/foo', function(req, res, next){1007 app.get('/foo', function () {1008 assert(0);1009 });10101011 app.use(function(err, req, res, next){
100 unmodified lines
modified:test/res.format.js+2 added-2 removed
59 unmodified lines
60});6162var app4 = express();6364app4.get('/', function(req, res, next){64app4.get('/', function (req, res) {65 res.format({66 text: function(){ res.send('hey') },67 html: function(){ res.send('<p>hey</p>') },68 json: function(){ res.send({ message: 'hey' }) }
85 unmodified lines
154 describe('in router', function(){155 var app = express();156 var router = express.Router();157158 router.get('/', function(req, res, next){158 router.get('/', function (req, res) {159 res.format({160 text: function(){ res.send('hey') },161 html: function(){ res.send('<p>hey</p>') },162 json: function(){ res.send({ message: 'hey' }) }
81 unmodified lines
modified:test/Router.js+1 added-1 removed
199 unmodified lines
200201 it('should handle throwing inside routes with params', function(done) {202 var router = new Router();203204 router.get('/foo/:id', function(req, res, next){204 router.get('/foo/:id', function () {205 throw new Error('foo');206 });207208 router.use(function(req, res, next){
405 unmodified lines