Skip to content

Commit

Permalink
Test for cache exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jul 9, 2010
1 parent 7724780 commit 08a30c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/jade.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,13 @@ module.exports = {
'test exceptions': function(assert){
var err;
try {
render('p= foo');
render('p= foo', { cache: true, filename: 'foo', locals: { foo: 'bar' }});
render('p= foo', { cache: true, filename: 'foo' });
} catch (e) {
err = e;
}
assert.equal(
"Jade:1\n 1. 'p= foo'\n\nfoo is not defined",
"foo:1\n 1. 'p= foo'\n\nfoo is not defined",
err.message);
},

Expand Down

0 comments on commit 08a30c2

Please sign in to comment.