mirror of
https://github.com/harttle/liquidjs.git
synced 2026-10-03 09:05:14 -07:00
chore: a simple liquid_method_missing case for #97
This commit is contained in:
@@ -9,6 +9,13 @@ describe('drop', function () {
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
engine = new Liquid()
|
engine = new Liquid()
|
||||||
})
|
})
|
||||||
|
it('should support liquid_method_missing', async function () {
|
||||||
|
let i = 0
|
||||||
|
const src = `{{settings.foo}},{{settings.foo}},{{settings.foo}}`
|
||||||
|
const ctx = { settings: { liquid_method_missing: () => i++ } }
|
||||||
|
const html = await engine.parseAndRender(src, ctx)
|
||||||
|
return expect(html).to.equal('0,1,2')
|
||||||
|
})
|
||||||
it('should test blank strings', async function () {
|
it('should test blank strings', async function () {
|
||||||
const src = `
|
const src = `
|
||||||
{% unless settings.fp_heading == blank %}
|
{% unless settings.fp_heading == blank %}
|
||||||
|
|||||||
Reference in New Issue
Block a user