mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 14:30:38 -07:00
docs: website for LiquidJS
This commit is contained in:
@@ -27,6 +27,14 @@ describe('tags/cycle', function () {
|
||||
return expect(html).to.equal('1e1e1')
|
||||
})
|
||||
|
||||
it('should considered different groups for different arguments', async function () {
|
||||
const src = "{% cycle '1', '2', '3'%}" +
|
||||
"{% cycle '1', '2'%}" +
|
||||
"{% cycle '1', '2', '3'%}"
|
||||
const html = await liquid.parseAndRender(src)
|
||||
return expect(html).to.equal('112')
|
||||
})
|
||||
|
||||
it('should support cycle group', async function () {
|
||||
const src = "{% cycle one: '1', '2', '3'%}" +
|
||||
"{% cycle 1: '1', '2', '3'%}" +
|
||||
|
||||
@@ -25,10 +25,14 @@ describe('drop/drop', function () {
|
||||
return key.toUpperCase()
|
||||
}
|
||||
}
|
||||
it('should call corresponding method', async function () {
|
||||
it('should call corresponding method when output', async function () {
|
||||
const html = await liquid.parseAndRender(`{{obj.getName}}`, { obj: new CustomDrop() })
|
||||
expect(html).to.equal('GET NAME')
|
||||
})
|
||||
it('should call corresponding method when expression evaluates', async function () {
|
||||
const html = await liquid.parseAndRender(`{% if obj.getName == "GET NAME" %}true{% endif %}`, { obj: new CustomDrop() })
|
||||
expect(html).to.equal('true')
|
||||
})
|
||||
it('should read corresponding property', async function () {
|
||||
const html = await liquid.parseAndRender(`{{obj.name}}`, { obj: new CustomDrop() })
|
||||
expect(html).to.equal('NAME')
|
||||
|
||||
Reference in New Issue
Block a user