mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
test: cases for async variables
This commit is contained in:
@@ -52,6 +52,11 @@ describe('Liquid', function () {
|
||||
const src = '{{ foo }}'
|
||||
return expect(engine.parseAndRender(src, {}, { strictVariables: true })).rejectedWith(/undefined variable/)
|
||||
})
|
||||
it('should support async variables in output', async () => {
|
||||
const src = '{{ foo }}'
|
||||
const html = await engine.parseAndRender(src, { foo: Promise.resolve('FOO') })
|
||||
expect(html).to.equal('FOO')
|
||||
})
|
||||
})
|
||||
describe('#express()', function () {
|
||||
const liquid = new Liquid({ root: '/root' })
|
||||
|
||||
Reference in New Issue
Block a user