Skip to content

Commit

Permalink
Add test cases for self-closing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyGu committed Sep 13, 2015
1 parent 729fe17 commit 19ca26f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions test/cases/self-closing-html.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!DOCTYPE html>
<html>
<body><br/></body>
</html>
4 changes: 4 additions & 0 deletions test/cases/self-closing-html.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
doctype html
html
body
br/
6 changes: 4 additions & 2 deletions test/jade.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ describe('jade', function(){
var str = [
'p',
'div',
'img'
'img',
'br/'
].join('\n');

var html = [
'<p></p>',
'<div></div>',
'<img/>'
'<img/>',
'<br/>'
].join('');

assert.equal(html, jade.render(str), 'Test basic tags');
Expand Down

0 comments on commit 19ca26f

Please sign in to comment.