Skip to content

Commit 2517338

Browse files
committed
test: remove unused function arguments in params
1 parent 442fd46 commit 2517338

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

test/Router.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ describe('Router', function(){
201201
it('should handle throwing inside routes with params', function(done) {
202202
var router = new Router();
203203

204-
router.get('/foo/:id', function(req, res, next){
204+
router.get('/foo/:id', function(){
205205
throw new Error('foo');
206206
});
207207

test/app.param.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ describe('app', function(){
166166
app.get('/:user', function(req, res, next) {
167167
next('route');
168168
});
169-
app.get('/:user', function(req, res, next) {
169+
app.get('/:user', function(req, res) {
170170
res.send(req.params.user);
171171
});
172172

@@ -187,11 +187,11 @@ describe('app', function(){
187187
next(new Error('invalid invocation'))
188188
});
189189

190-
app.post('/:user', function(req, res, next) {
190+
app.post('/:user', function(req, res) {
191191
res.send(req.params.user);
192192
});
193193

194-
app.get('/:thing', function(req, res, next) {
194+
app.get('/:thing', function(req, res) {
195195
res.send(req.thing);
196196
});
197197

test/app.router.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('app.router', function(){
9090
it('should decode correct params', function(done){
9191
var app = express();
9292

93-
app.get('/:name', function(req, res, next){
93+
app.get('/:name', function(req, res){
9494
res.send(req.params.name);
9595
});
9696

@@ -102,7 +102,7 @@ describe('app.router', function(){
102102
it('should not accept params in malformed paths', function(done) {
103103
var app = express();
104104

105-
app.get('/:name', function(req, res, next){
105+
app.get('/:name', function(req, res){
106106
res.send(req.params.name);
107107
});
108108

@@ -114,7 +114,7 @@ describe('app.router', function(){
114114
it('should not decode spaces', function(done) {
115115
var app = express();
116116

117-
app.get('/:name', function(req, res, next){
117+
app.get('/:name', function(req, res){
118118
res.send(req.params.name);
119119
});
120120

@@ -126,7 +126,7 @@ describe('app.router', function(){
126126
it('should work with unicode', function(done) {
127127
var app = express();
128128

129-
app.get('/:name', function(req, res, next){
129+
app.get('/:name', function(req, res){
130130
res.send(req.params.name);
131131
});
132132

@@ -910,7 +910,7 @@ describe('app.router', function(){
910910
next();
911911
});
912912

913-
app.get('/bar', function(req, res){
913+
app.get('/bar', function(){
914914
assert(0);
915915
});
916916

@@ -919,7 +919,7 @@ describe('app.router', function(){
919919
next();
920920
});
921921

922-
app.get('/foo', function(req, res, next){
922+
app.get('/foo', function(req, res){
923923
calls.push('/foo 2');
924924
res.json(calls)
925925
});
@@ -939,7 +939,7 @@ describe('app.router', function(){
939939
next('route')
940940
}
941941

942-
app.get('/foo', fn, function(req, res, next){
942+
app.get('/foo', fn, function(req, res){
943943
res.end('failure')
944944
});
945945

@@ -964,11 +964,11 @@ describe('app.router', function(){
964964
next('router')
965965
}
966966

967-
router.get('/foo', fn, function (req, res, next) {
967+
router.get('/foo', fn, function (req, res) {
968968
res.end('failure')
969969
})
970970

971-
router.get('/foo', function (req, res, next) {
971+
router.get('/foo', function (req, res) {
972972
res.end('failure')
973973
})
974974

@@ -995,7 +995,7 @@ describe('app.router', function(){
995995
next();
996996
});
997997

998-
app.get('/bar', function(req, res){
998+
app.get('/bar', function(){
999999
assert(0);
10001000
});
10011001

@@ -1004,7 +1004,7 @@ describe('app.router', function(){
10041004
next(new Error('fail'));
10051005
});
10061006

1007-
app.get('/foo', function(req, res, next){
1007+
app.get('/foo', function(){
10081008
assert(0);
10091009
});
10101010

test/res.format.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ app3.use(function(req, res, next){
6161

6262
var app4 = express();
6363

64-
app4.get('/', function(req, res, next){
64+
app4.get('/', function(req, res){
6565
res.format({
6666
text: function(){ res.send('hey') },
6767
html: function(){ res.send('<p>hey</p>') },
@@ -155,7 +155,7 @@ describe('res', function(){
155155
var app = express();
156156
var router = express.Router();
157157

158-
router.get('/', function(req, res, next){
158+
router.get('/', function(req, res){
159159
res.format({
160160
text: function(){ res.send('hey') },
161161
html: function(){ res.send('<p>hey</p>') },

0 commit comments

Comments
 (0)