Skip to content
Myr

Added test for async render exceptions without callback

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 6e40914 · Browse files · 1 file+12 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+12 added−0 removed

  • tests:+12 added−0 removed

1 file+12 added−0 removed

modified:test/view.test.js+12 added
34 unmodified lines
35 });36 app.get('/invalid', function(req, res){37 res.render('invalid.jade', { layout: false });38 });39 app.get('/invalid-async', function(req, res){40 process.nextTick(function(){41 res.render('invalid.jade', { layout: false });42 });43 });44 app.get('/error', function(req, res){45 res.render('invalid.jade', { layout: false }, function(err){46 res.send(err.arguments[0]);47 });
19 unmodified lines
67 function(res){68 assert.ok(res.body.indexOf('ReferenceError') >= 0);69 assert.ok(res.body.indexOf('doesNotExist') >= 0);70 });71 assert.response(app,72 { url: '/invalid-async' },73 function(res){74 assert.ok(res.body.indexOf('ReferenceError') >= 0);75 assert.ok(res.body.indexOf('doesNotExist') >= 0);76 });7778 },79 80 'test #render() layout': function(assert){81 var app = create();
245 unmodified lines