Skip to content

Commit

Permalink
Added failing filter text block exception test
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 2, 2010
1 parent 09d7e34 commit 858c459
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/jade.test.js
Expand Up @@ -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)'));
Expand Down

0 comments on commit 858c459

Please sign in to comment.