We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ac2509 commit de7ffcaCopy full SHA for de7ffca
test/app.routes.error.js
@@ -3,6 +3,22 @@ var express = require('../')
3
4
describe('app', function(){
5
describe('.VERB()', function(){
6
+ it('should not get invoked without error handler on error', function(done) {
7
+ var app = express();
8
+
9
+ app.use(function(req, res, next){
10
+ next(new Error('boom!'))
11
+ });
12
13
+ app.get('/bar', function(req, res){
14
+ res.send('hello, world!');
15
16
17
+ request(app)
18
+ .post('/bar')
19
+ .expect(500, /Error: boom!/, done);
20
21
22
it('should only call an error handling routing callback when an error is propagated', function(done){
23
var app = express();
24
0 commit comments