Skip to content
Myr

Added test to confirm view helper usage w/ ejs

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 838a51d · Browse files · 2 files+8 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

2 files+8 added−0 removed

  • tests:+8 added−0 removed

2 files+8 added−0 removed

added:test/fixtures/dynamic-helpers.ejs+1 added
1<p><%= greetings(session, lastName) %></p>
modified:test/view.test.js+7 added
267 unmodified lines
268 app.get('/', function(req, res){269 req.session = { name: 'tj' };270 res.render('dynamic-helpers.jade', { layout: false });271 });272 app.get('/ejs', function(req, res){273 req.session = { name: 'tj' };274 res.render('dynamic-helpers.ejs', { layout: false });275 });276 app.get('/precedence', function(req, res){277 req.session = { name: 'tj' };278 res.render('dynamic-helpers.jade', {279 layout: false,
6 unmodified lines
286 assert.response(app,287 { url: '/' },288 { body: '<p>Hello tj holowaychuk</p>' });289 assert.response(app,290 { url: '/ejs' },291 { body: '<p>Hello tj holowaychuk</p>' });292 assert.response(app,293 { url: '/precedence' },294 { body: '<p>Hello tj foobar</p>' });295 },296
205 unmodified lines