Skip to content
Myr

Merge branch 'render-next'

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 · parents 6e40914, f8477c4 · Browse files · 3 files+14 added−1 removed
This commit

State

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

Diff stats

3 files+14 added−1 removed

  • tests:+12 added−0 removed
  • other:+2 added−1 removed

3 files+14 added−1 removed

modified:lib/express/server.js+1 added
39 unmodified lines
40 res.headers = {};41 req.app = res.app = self;42 req.res = res;43 res.req = req;44 req.next = next;45 // Assign req.params.get46 if (req.url.indexOf('?') > 0) {47 // TODO: consider simple substr to increase performance48 var query = url.parse(req.url).query;
188 unmodified lines
modified:lib/express/view.js+1 added-1 removed
274 unmodified lines
275 function error(err) {276 if (fn) {277 fn(err);278 } else {279 throw err;279 self.req.next(err);280 }281 }282283 // Cache contents
29 unmodified lines
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