refactor filters and corresponding tests

This commit is contained in:
harttle
2016-10-24 00:05:17 +08:00
parent 300c3710c6
commit 365a047736
10 changed files with 358 additions and 242 deletions
+3 -3
View File
@@ -16,10 +16,10 @@ function test(promise, cb){
describe('error', function() {
it('should throw TokenizationError when tag illegal', function() {
return test(engine.parseAndRender('{% -a %}', {}), function(err){
return test(engine.parseAndRender('{% . a %}', {}), function(err){
expect(err.name).to.equal('TokenizationError');
expect(err.message).to.equal('illegal tag: {% -a %}');
expect(err.input).to.equal('{% -a %}');
expect(err.message).to.equal('illegal tag: {% . a %}');
expect(err.input).to.equal('{% . a %}');
expect(err.line).to.equal(1);
});
});