Skip to content

Commit

Permalink
Add test for async error throwing when includes have invalid tags
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasartman committed Feb 18, 2016
1 parent 2cd97d5 commit ee03e79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/compiler.js
Expand Up @@ -918,6 +918,14 @@
finish(done);
});

it('should throw an error synchronously when including a file with an invalid tag', function() {
var callRender = function () {
render('{% include "undefined-tag.j2" %}');
};

expect(callRender).to.throwException();
});

it('should fail silently on missing templates if requested', function(done) {
equal('hello world {% include "missing.j2" ignore missing %}',
'hello world ');
Expand Down
1 change: 1 addition & 0 deletions tests/templates/undefined-tag.j2
@@ -0,0 +1 @@
{% invalidTag %}

0 comments on commit ee03e79

Please sign in to comment.