Skip to content
Myr

Added test for layouts in a directory

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 699e6e1 · Browse files · 2 files+7 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+7 added−0 removed

  • tests:+7 added−0 removed

2 files+7 added−0 removed

added:test/fixtures/layouts/foo.jade+1 added
1foo
modified:test/view.test.js+6 added
100 unmodified lines
101 });102 app.get('/no-ext', function(req, res){103 res.render('index.jade', { layout: 'cool-layout' });104 });105 app.get('/foo', function(req, res){106 res.render('index.jade', { layout: 'layouts/foo.jade' });107 });108109 assert.response(app,110 { url: '/' },111 { body: '<cool><p>Welcome</p></cool>' });112 assert.response(app,113 { url: '/no-ext' },114 { body: '<cool><p>Welcome</p></cool>' });115 assert.response(app,116 { url: '/foo' },117 { body: '<foo></foo>' });118 },119 120 'test #render() specific layout "view engine"': function(assert){121 var app = create();
211 unmodified lines