mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
fix: throw ParseError instead of RenderError for invalid assign expression, closes #519
This commit is contained in:
@@ -256,4 +256,8 @@ describe('Issues', function () {
|
||||
const html = engine.parseAndRenderSync(`{% for i in (1..10000) %}{{ i }}{% endfor %}`)
|
||||
expect(html).to.have.lengthOf(38894)
|
||||
})
|
||||
it('#519 should throw parse error for invalid assign expression', () => {
|
||||
const engine = new Liquid()
|
||||
expect(() => engine.parse('{% assign headshot = https://testurl.com/not_enclosed_in_quotes.jpg %}')).to.throw(/unexpected token at ":/)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user