lint: remove unused function arguments in tests

closes #5124
This commit is contained in:
Rakesh Bisht
2023-02-10 11:50:16 +05:30
committed by Douglas Christopher Wilson
parent 442fd46799
commit c6ee8d6e7f
4 changed files with 17 additions and 17 deletions

View File

@@ -201,7 +201,7 @@ describe('Router', function(){
it('should handle throwing inside routes with params', function(done) {
var router = new Router();
router.get('/foo/:id', function(req, res, next){
router.get('/foo/:id', function () {
throw new Error('foo');
});

View File

@@ -166,7 +166,7 @@ describe('app', function(){
app.get('/:user', function(req, res, next) {
next('route');
});
app.get('/:user', function(req, res, next) {
app.get('/:user', function (req, res) {
res.send(req.params.user);
});
@@ -187,11 +187,11 @@ describe('app', function(){
next(new Error('invalid invocation'))
});
app.post('/:user', function(req, res, next) {
app.post('/:user', function (req, res) {
res.send(req.params.user);
});
app.get('/:thing', function(req, res, next) {
app.get('/:thing', function (req, res) {
res.send(req.thing);
});

View File

@@ -90,7 +90,7 @@ describe('app.router', function(){
it('should decode correct params', function(done){
var app = express();
app.get('/:name', function(req, res, next){
app.get('/:name', function (req, res) {
res.send(req.params.name);
});
@@ -102,7 +102,7 @@ describe('app.router', function(){
it('should not accept params in malformed paths', function(done) {
var app = express();
app.get('/:name', function(req, res, next){
app.get('/:name', function (req, res) {
res.send(req.params.name);
});
@@ -114,7 +114,7 @@ describe('app.router', function(){
it('should not decode spaces', function(done) {
var app = express();
app.get('/:name', function(req, res, next){
app.get('/:name', function (req, res) {
res.send(req.params.name);
});
@@ -126,7 +126,7 @@ describe('app.router', function(){
it('should work with unicode', function(done) {
var app = express();
app.get('/:name', function(req, res, next){
app.get('/:name', function (req, res) {
res.send(req.params.name);
});
@@ -910,7 +910,7 @@ describe('app.router', function(){
next();
});
app.get('/bar', function(req, res){
app.get('/bar', function () {
assert(0);
});
@@ -919,7 +919,7 @@ describe('app.router', function(){
next();
});
app.get('/foo', function(req, res, next){
app.get('/foo', function (req, res) {
calls.push('/foo 2');
res.json(calls)
});
@@ -939,7 +939,7 @@ describe('app.router', function(){
next('route')
}
app.get('/foo', fn, function(req, res, next){
app.get('/foo', fn, function (req, res) {
res.end('failure')
});
@@ -964,11 +964,11 @@ describe('app.router', function(){
next('router')
}
router.get('/foo', fn, function (req, res, next) {
router.get('/foo', fn, function (req, res) {
res.end('failure')
})
router.get('/foo', function (req, res, next) {
router.get('/foo', function (req, res) {
res.end('failure')
})
@@ -995,7 +995,7 @@ describe('app.router', function(){
next();
});
app.get('/bar', function(req, res){
app.get('/bar', function () {
assert(0);
});
@@ -1004,7 +1004,7 @@ describe('app.router', function(){
next(new Error('fail'));
});
app.get('/foo', function(req, res, next){
app.get('/foo', function () {
assert(0);
});

View File

@@ -61,7 +61,7 @@ app3.use(function(req, res, next){
var app4 = express();
app4.get('/', function(req, res, next){
app4.get('/', function (req, res) {
res.format({
text: function(){ res.send('hey') },
html: function(){ res.send('<p>hey</p>') },
@@ -155,7 +155,7 @@ describe('res', function(){
var app = express();
var router = express.Router();
router.get('/', function(req, res, next){
router.get('/', function (req, res) {
res.format({
text: function(){ res.send('hey') },
html: function(){ res.send('<p>hey</p>') },