mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 14:00:39 -07:00
* fix: more flexible squared property read expression, fixes #643 * fix: unecessary error wrapping in browser bundles * style: update code style and types * perf: use token.value when evalToken
This commit is contained in:
@@ -7,4 +7,18 @@ describe('browser', function () {
|
||||
message: 'output "{{huh" not closed, line:1, col:1'
|
||||
})
|
||||
})
|
||||
it('should throw tokenization error for invalid filter syntax', async () => {
|
||||
const engine = new LiquidUMD()
|
||||
const message = 'expected filter name, line:1, col:10'
|
||||
const stack = [
|
||||
'>> 1| {{ foo | ^ }}',
|
||||
' ^',
|
||||
`TokenizationError: ${message}`
|
||||
].join('\n')
|
||||
await expect(engine.parseAndRender('{{ foo | ^ }}')).rejects.toMatchObject({
|
||||
message,
|
||||
stack: expect.stringContaining(stack),
|
||||
name: 'TokenizationError'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user