mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
docs: more specific description of strftime
This commit is contained in:
@@ -75,11 +75,17 @@ describe('tags/assign', function () {
|
||||
const html = await liquid.parseAndRender(src, { num: 1 })
|
||||
return expect(html).to.equal('11')
|
||||
})
|
||||
it('should write to the belonging scope', async function () {
|
||||
it('should write to the root scope', async function () {
|
||||
const src = '{%for a in (1..2)%}{%assign num = a%}{{a}}{%endfor%} {{num}}'
|
||||
const html = await liquid.parseAndRender(src, { num: 1 })
|
||||
return expect(html).to.equal('12 2')
|
||||
})
|
||||
it('should not change input scope', async function () {
|
||||
const src = '{%for a in (1..2)%}{%assign num = a%}{{a}}{%endfor%} {{num}}'
|
||||
const ctx = { num: 1 }
|
||||
await liquid.parseAndRender(src, ctx)
|
||||
return expect(ctx.num).to.equal(1)
|
||||
})
|
||||
})
|
||||
it('should support sync', function () {
|
||||
const src = '{% assign foo="bar" %}{{foo}}'
|
||||
|
||||
Reference in New Issue
Block a user