refactor: improve readability (#6173)
[express.git] / test / regression.js
blob4e99b306948ec5d00095cfca8df0c7571c3cbf66
1 'use strict'
3 var express = require('../')
4   , request = require('supertest');
6 describe('throw after .end()', function(){
7   it('should fail gracefully', function(done){
8     var app = express();
10     app.get('/', function(req, res){
11       res.end('yay');
12       throw new Error('boom');
13     });
15     request(app)
16     .get('/')
17     .expect('yay')
18     .expect(200, done);
19   })