Added haml 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 14280df · Browse files · 5 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
5 files+19 added−0 removed
- tests:+15 added−0 removed
- other:+4 added−0 removed
Provenance
- Commit
dc5caeb- Tree
e684e88- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent
14280df
5 files changed+19 added−0 removed
added:support/hamlnot shown
Its text is not shown, added.
added:test/fixtures/hello.haml+1 added
1+%p Hello Worldmodified:test/view.test.js+14 added
7 unmodified lines891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465667 unmodified linesmodule.exports = { 'test #render()': function(assert){ var app = express.createServer(); app.set('views', __dirname + '/fixtures');
app.get('/', function(req, res){ res.render('index.jade', { layout: false }); }); app.get('/haml', function(req, res){ res.render('hello.haml', { layout: false }); });
assert.response(app, { url: '/' }, { body: '<p>Welcome</p>' }); assert.response(app, { url: '/haml' }, { body: '\n<p>Hello World</p>' }); }, 'test #render() layout': function(assert){ var app = express.createServer(); app.set('views', __dirname + '/fixtures');
app.get('/', function(req, res){ res.render('index.jade'); });
assert.response(app, { url: '/' }, { body: '<html><body><p>Welcome</p></body></html>' }); }, 'test #render() specific layout': function(assert){ var app = express.createServer(); app.set('views', __dirname + '/fixtures');
app.get('/', function(req, res){ res.render('index.jade', { layout: 'cool.layout.jade' }); });
assert.response(app, { url: '/' }, { body: '<cool><p>Welcome</p></cool>' }); }, 'test #partial()': function(assert){ var app = express.createServer(); app.set('views', __dirname + '/fixtures');
app.get('/', function(req, res){ res.render('items.jade', { locals: { items: ['one', 'two'] }}); });
assert.response(app, { url: '/' }, { body: '<html><body><ul><li>one</li><li>two</li></ul></body></html>' }); }};modified:.gitmodules+3 added
5 unmodified lines6 url = git://github.com/extjs/Connect.git7 [submodule "support/jade"]8 path = support/jade9 url = git://github.com/visionmedia/jade.git10+[submodule "support/haml"]11+ path = support/haml12+ url = git://github.com/visionmedia/haml.js.gitmodified:Makefile+1 added
28 unmodified lines29 test:30 @CONNECT_ENV=test ./support/expresso/bin/expresso \31 -I lib \32 -I support/connect/lib \33+ -I support/haml/lib \34 -I support/jade/lib \35 test/*.test.js36 37 docs: docs/api.html $(MANPAGES) $(HTMLDOCS)21 unmodified lines