Skip to content
Myr

Added error in res.render() callback test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent c32023d · Browse files · 1 file+25 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+25 added−0 removed

  • tests:+25 added−0 removed

1 file+25 added−0 removed

modified:test/res.render.js+25 added
260 unmodified lines
261 res.body.should.match(/is not defined/);262 done();263 });264 })265 266 describe('in the callback', function(){267 it('should next(err)', function(done){268 var app = express();269270 app.set('views', __dirname + '/fixtures');271272 app.use(function(req, res){273 res.render('user.jade', function(err){274 req.foo();275 });276 });277278 app.use(function(err, req, res, next){279 res.end(err.message);280 });281282 request(app)283 .get('/')284 .end(function(res){285 res.body.should.match(/has no method 'foo'/);286 done();287 });288 })289 })290 })291 })292 293 describe('"status" options', function(){
39 unmodified lines