Skip to content
Myr

Added assertions for dynamic helper params and scope

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 7eb088b · Browse files · 1 file+5 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

1 file+5 added−1 removed

  • tests:+5 added−1 removed

1 file+5 added−1 removed

modified:test/view.test.js+5 added-1 removed
124 unmodified lines
125 app.set('views', __dirname + '/fixtures');126127 app.helpers({128 lastName: 'holowaychuk',129 session: function(req){129 session: function(req, res, params){130 assert.equal('object', typeof req, 'Test dynamic helper req');131 assert.equal('object', typeof req, 'Test dynamic helper res');132 assert.equal('object', typeof req, 'Test dynamic helper params');133 assert.ok(this instanceof express.Server, 'Test dynamic helper app scope');134 return req.session;135 }136 });137
148 unmodified lines