mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
refactor: static strict_filters, disable settigns when rendering
This commit is contained in:
+8
-8
@@ -130,14 +130,6 @@ describe('error', function() {
|
||||
expect(e.message).to.contain('undefined variable: a');
|
||||
});
|
||||
});
|
||||
it('should throw RenderError when filter not defined', function() {
|
||||
return expect(strictEngine.parseAndRender('{{1 | a}}')).to.eventually
|
||||
.be.rejected
|
||||
.then(function(e) {
|
||||
expect(e).to.have.property('name', 'RenderError');
|
||||
expect(e.message).to.contain('undefined filter: a');
|
||||
});
|
||||
});
|
||||
it('should contain template content in err.message', function() {
|
||||
var html = ['1st', '2nd', '3rd', 'X{%throwingTag%} Y', '5th', '6th', '7th'];
|
||||
var message = [
|
||||
@@ -207,6 +199,14 @@ describe('error', function() {
|
||||
}
|
||||
});
|
||||
});
|
||||
it('should throw RenderError when filter not defined', function() {
|
||||
return expect(strictEngine.parseAndRender('{{1 | a}}')).to.eventually
|
||||
.be.rejected
|
||||
.then(function(e) {
|
||||
expect(e).to.have.property('name', 'ParseError');
|
||||
expect(e.message).to.contain('undefined filter: a');
|
||||
});
|
||||
});
|
||||
it('should throw ParseError when tag not closed', function() {
|
||||
return expect(engine.parseAndRender('{% if %}')).to.eventually
|
||||
.be.rejected
|
||||
|
||||
Reference in New Issue
Block a user