mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 14:00:39 -07:00
Fix to make for tag iterate objects like Shopify liquid.
Ref: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#allowed-collection-types
This commit is contained in:
+2
-2
@@ -28,9 +28,9 @@ describe('tags/for', function () {
|
||||
})
|
||||
|
||||
it('should support object', function () {
|
||||
var src = '{%for key in obj%}{{key}}-{%else%}b{%endfor%}'
|
||||
var src = '{%for item in obj%}{{item[0]}},{{item[1]}}-{%else%}b{%endfor%}'
|
||||
return expect(liquid.parseAndRender(src, ctx))
|
||||
.to.eventually.equal('foo-coo-')
|
||||
.to.eventually.equal('foo,bar-coo,haa-')
|
||||
})
|
||||
|
||||
describe('scope', function () {
|
||||
|
||||
Reference in New Issue
Block a user