Skip to content
Myr

Added another partial locals test

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 1130a23 · Browse files · 3 files+20 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+20 added−0 removed

  • tests:+20 added−0 removed

3 files+20 added−0 removed

added:test/fixtures/list-item2.jade+4 added
1- if ('undefined' == typeof item)2 li empty3- else4 li= item
added:test/fixtures/list2.jade+4 added
1ul2 != partial('list-item2', { locals: { item: 'foo' }})3 != partial('list-item2', { locals: { item: 'bar' }})4 != partial('list-item2')
modified:test/view.test.js+12 added
594 unmodified lines
595 { url: '/' },596 { body: '<ul><li>foo</li><li>empty</li></ul>' });597 },598 599 'test #partial() with several calls using locals': function(){600 var app = create();601602 app.get('/', function(req, res, next){603 res.render('list2.jade', { layout: false });604 });605 606 assert.response(app,607 { url: '/' },608 { body: '<ul><li>foo</li><li>bar</li><li>empty</li></ul>' });609 },610 611 'test #partial() locals': function(){612 var app = create();613614 app.get('/', function(req, res, next){
276 unmodified lines