feature: strict rendering, close #9

This commit is contained in:
harttle
2016-09-26 23:25:08 +08:00
parent be6c67a1ba
commit 937d213a2d
8 changed files with 101 additions and 68 deletions
-8
View File
@@ -42,14 +42,6 @@ describe('error', function() {
});
});
it('should throw ParseError when filter not exist', function() {
return test(engine.parseAndRender('{{ a | xz }}', {}), function(err){
expect(err.name).to.equal('ParseError');
expect(err.message).to.equal('filter "xz" not found');
expect(err.input).to.equal('{{ a | xz }}');
expect(err.line).to.equal(1);
});
});
it('should throw ParseError when tag not exist', function() {
return test(engine.parseAndRender('{% a %}', {}), function(err){
expect(err.name).to.equal('ParseError');