Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added comment tests

  • Loading branch information...
commit 4d3d18ba3ef625722702331118bf44f7db62b944 1 parent dc99fea
@tj tj authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 test/jade.test.js
View
28 test/jade.test.js
@@ -419,6 +419,34 @@ module.exports = {
assert.equal('<p class="user-1"></p>', render('p(class: "user-" + 1)'));
},
+ 'test comments': function(assert){
+ var str = [
+ '// foo',
+ 'p bar'
+ ].join('\n');
+
+ var html = [
+ '<!-- foo -->',
+ '<p>bar</p>'
+ ].join('');
+
+ assert.equal(html, render(str));
+
+ var str = [
+ 'p foo',
+ '// bar',
+ 'p baz'
+ ].join('\n');
+
+ var html = [
+ '<p>foo</p>',
+ '<!-- bar -->',
+ '<p>baz</p>'
+ ].join('');
+
+ assert.equal(html, render(str));
+ },
+
'test code': function(assert){
var str = [
'- var foo = "<script>";',
Please sign in to comment.
Something went wrong with that request. Please try again.