mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 05:50:43 -07:00
fix: comparison for empty/nil, fixes #321
This commit is contained in:
@@ -79,4 +79,14 @@ describe('drop/empty-drop', function () {
|
||||
const html = await liquid.parseAndRender(src)
|
||||
expect(html).to.equal('true')
|
||||
})
|
||||
it('empty != empty', async function () {
|
||||
const src = '{%if empty == empty %}true{%else%}false{% endif %}'
|
||||
const html = await liquid.parseAndRender(src)
|
||||
expect(html).to.equal('false')
|
||||
})
|
||||
it('empty != nil', async function () {
|
||||
const src = '{%if empty == nil %}true{%else%}false{% endif %}'
|
||||
const html = await liquid.parseAndRender(src)
|
||||
expect(html).to.equal('false')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user