Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added failing filter text block exception test

  • Loading branch information...
commit 858c4596598d90ac2bdb026b5eb4d16cb1e6b1e9 1 parent 09d7e34
@tj tj authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 test/jade.test.js
View
19 test/jade.test.js
@@ -337,6 +337,25 @@ module.exports = {
err.message);
},
+ 'test filter text block exceptions': function(assert){
+ var err;
+ try {
+ render([
+ ':javascript',
+ ' | foo',
+ ' | bar',
+ ' | #{baz}',
+ ' | raz'
+ ].join('\n'));
+ } catch (e) {
+ err = e;
+ }
+ console.log(err.message);
+ assert.equal(
+ "Jade:5\n 2. ' | foo'\n 3. ' | bar'\n 4. ' | #{baz}'\n\nbaz is not defined",
+ err.message);
+ },
+
'test html 5 mode': function(assert){
assert.equal('<!DOCTYPE html><input type="checkbox" checked>', render('!!! 5\ninput(type="checkbox", checked)'));
assert.equal('<!DOCTYPE html><input type="checkbox" checked>', render('!!! 5\ninput(type="checkbox", checked: true)'));
Please sign in to comment.
Something went wrong with that request. Please try again.