diff --git a/test/app.router.js b/test/app.router.js index 8e427bd6dc..79db75d10d 100644 --- a/test/app.router.js +++ b/test/app.router.js @@ -55,6 +55,17 @@ describe('app.router', function(){ .expect(200, done) }) + it('should not support ' + method.toUpperCase() + ' without a path', function () { + if (method === 'get' || (method === 'query' && shouldSkipQuery(process.versions.node))) { + this.skip(); + } + var app = express(); + + assert.throws(() => { + app[method](function (req, res) { }); + }); + }); + it('should reject numbers for app.' + method, function(){ var app = express(); assert.throws(app[method].bind(app, '/', 3), /Number/)