Skip to content
Myr

Added test for partial locals on subsequent calls

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 9ac6943 · Browse files · 3 files+19 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

3 files+19 added−0 removed

  • tests:+19 added−0 removed

3 files+19 added−0 removed

added:test/fixtures/list-item.jade+4 added
1- if ('undefined' == typeof listItem)2 li empty3- else4 li= listItem
added:test/fixtures/list.jade+3 added
1ul2 != partial('list-item', { object: 'foo' })3 != partial('list-item')
modified:test/view.test.js+12 added
582 unmodified lines
583 { url: '/role' },584 { body: '<li>Role: admin</li><li>Role: member</li>' });585 },586 587 'test #partial() with several calls': function(){588 var app = create();589590 app.get('/', function(req, res, next){591 res.render('list.jade', { layout: false });592 });593 594 assert.response(app,595 { url: '/' },596 { body: '<ul><li>foo</li><li>empty</li></ul>' });597 },598 599 'test #partial() locals': function(){600 var app = create();601602 app.get('/', function(req, res, next){
276 unmodified lines