mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
fix: case/when array equality, #673
This commit is contained in:
@@ -119,4 +119,17 @@ describe('tags/case', function () {
|
||||
'{%- endcase %}', {})
|
||||
expect(result).toEqual('show this')
|
||||
})
|
||||
it('should apply value equal for arrays', () => {
|
||||
const engine = new Liquid()
|
||||
const result = engine.parseAndRenderSync(`
|
||||
{%- assign x = "a,b,c" | split: "," %}
|
||||
{%- assign y = "a,b,c" | split: "," %}
|
||||
{% case x %}{% when y %}TRUE{% else %}FALSE{% endcase %}
|
||||
{% if x == y %}TRUE{% else %}FALSE{% endif %}
|
||||
`)
|
||||
expect(result).toEqual(`
|
||||
TRUE
|
||||
TRUE
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user