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
Provenance
- Commit
c6ee8d6- Tree
55088b9- Author
Rakesh Bisht <raks.bisht@gmail.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent
442fd46
4 files changed+17 added−17 removed
modified:test/app.param.js+3 added-3 removed
164 unmodified lines165 166 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 });172 173 request(app)12 unmodified lines186 app.param('user', function(req, res, next, user) {187 next(new Error('invalid invocation'))188 });189 190- app.post('/:user', function(req, res, next) {190+ app.post('/:user', function (req, res) {191 res.send(req.params.user);192 });193 194- app.get('/:thing', function(req, res, next) {194+ app.get('/:thing', function (req, res) {195 res.send(req.thing);196 });197 198 request(app)167 unmodified linesmodified:test/app.router.js+11 added-11 removed
88 unmodified lines89 describe('decode params', function () {90 it('should decode correct params', function(done){91 var app = express();92 93- app.get('/:name', function(req, res, next){93+ app.get('/:name', function (req, res) {94 res.send(req.params.name);95 });96 97 request(app)3 unmodified lines101 102 it('should not accept params in malformed paths', function(done) {103 var app = express();104 105- app.get('/:name', function(req, res, next){105+ app.get('/:name', function (req, res) {106 res.send(req.params.name);107 });108 109 request(app)3 unmodified lines113 114 it('should not decode spaces', function(done) {115 var app = express();116 117- app.get('/:name', function(req, res, next){117+ app.get('/:name', function (req, res) {118 res.send(req.params.name);119 });120 121 request(app)3 unmodified lines125 126 it('should work with unicode', function(done) {127 var app = express();128 129- app.get('/:name', function(req, res, next){129+ app.get('/:name', function (req, res) {130 res.send(req.params.name);131 });132 133 request(app)775 unmodified lines909 calls.push('/foo/:bar?');910 next();911 });912 913- app.get('/bar', function(req, res){913+ app.get('/bar', function () {914 assert(0);915 });916 917 app.get('/foo', function(req, res, next){918 calls.push('/foo');919 next();920 });921 922- 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 lines938 res.set('X-Hit', '1')939 next('route')940 }941 942- app.get('/foo', fn, function(req, res, next){942+ app.get('/foo', fn, function (req, res) {943 res.end('failure')944 });945 946 app.get('/foo', function(req, res){16 unmodified lines963 res.set('X-Hit', '1')964 next('router')965 }966 967- router.get('/foo', fn, function (req, res, next) {967+ router.get('/foo', fn, function (req, res) {968 res.end('failure')969 })970 971- router.get('/foo', function (req, res, next) {971+ router.get('/foo', function (req, res) {972 res.end('failure')973 })974 975 app.use(router)18 unmodified lines994 calls.push('/foo/:bar?');995 next();996 });997 998- app.get('/bar', function(req, res){998+ app.get('/bar', function () {999 assert(0);1000 });1001 1002 app.get('/foo', function(req, res, next){1003 calls.push('/foo');1004 next(new Error('fail'));1005 });1006 1007- app.get('/foo', function(req, res, next){1007+ app.get('/foo', function () {1008 assert(0);1009 });1010 1011 app.use(function(err, req, res, next){100 unmodified linesmodified:test/res.format.js+2 added-2 removed
59 unmodified lines60 });61 62 var app4 = express();63 64-app4.get('/', function(req, res, next){64+app4.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 lines154 describe('in router', function(){155 var app = express();156 var router = express.Router();157 158- 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 linesmodified:test/Router.js+1 added-1 removed
199 unmodified lines200 201 it('should handle throwing inside routes with params', function(done) {202 var router = new Router();203 204- router.get('/foo/:id', function(req, res, next){204+ router.get('/foo/:id', function () {205 throw new Error('foo');206 });207 208 router.use(function(req, res, next){405 unmodified lines