mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -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 () {
|
||||
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 () {
|
||||
const src = `
|
||||
{% unless settings.fp_heading == blank %}
|
||||
|
||||
Reference in New Issue
Block a user