mirror of
https://github.com/zebrajr/express.git
synced 2026-01-15 12:15:27 +00:00
added regression test for #847
This commit is contained in:
22
test/regression.js
Normal file
22
test/regression.js
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
var express = require('../')
|
||||
, request = require('./support/http');
|
||||
|
||||
describe('throw after .end()', function(){
|
||||
it('should fail gracefully', function(done){
|
||||
var app = express();
|
||||
|
||||
app.get('/', function(req, res){
|
||||
res.end('yay');
|
||||
throw new Error('boom');
|
||||
});
|
||||
|
||||
request(app)
|
||||
.get('/')
|
||||
.end(function(res){
|
||||
res.should.have.status(200);
|
||||
res.body.should.equal('yay');
|
||||
done();
|
||||
});
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user