mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
feat: support function calls, closes #222
This commit is contained in:
@@ -70,4 +70,12 @@ describe('Issues', function () {
|
||||
const html = await engine.parseAndRender(`{{ '{{' }}{{ '}}' }}`)
|
||||
expect(html).to.equal('{{}}')
|
||||
})
|
||||
it('#222 Support function calls', async () => {
|
||||
const engine = new Liquid()
|
||||
const html = await engine.parseAndRender(
|
||||
`{{ obj.property }}`,
|
||||
{ obj: { property: () => 'BAR' } }
|
||||
)
|
||||
expect(html).to.equal('BAR')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user