Permalink
Browse files

Added tests for `quiet` option.

  • Loading branch information...
1 parent 2f33c46 commit 06762d62b8038d3685a6d0628a8b125186b1bb9a @stagas committed Feb 26, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1 test/jade.test.js
View
16 test/jade.test.js
@@ -1021,7 +1021,21 @@ module.exports = {
var fn = jade.compile('p foo\np #{bar}', {compileDebug: false, helpers: 'global'});
assert.equal('<p>foo</p><p>baz</p>', fn({bar: 'baz'}));
},
-
+
+ 'test .compile() missing local no quiet': function(){
+ var fn = jade.compile('p= foo\np= bar');
+ try {
+ fn({ foo: 'foo' });
+ } catch (err) {
+ assert.throws(err);
+ }
+ },
+
+ 'test .compile() missing local with quiet': function(){
+ var fn = jade.compile('p= foo\np= bar', {quiet: true});
+ assert.equal('<p>foo</p><p></p>', fn({ foo: 'foo' }));
+ },
+
'test null attrs on tag': function(){
var tag = new jade.nodes.Tag('a'),
name = 'href',

0 comments on commit 06762d6

Please sign in to comment.