mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
fix: support integer arithmetic for divided_by, closes #465
This commit is contained in:
@@ -199,6 +199,11 @@ describe('Issues', function () {
|
||||
const html = engine.parseAndRenderSync('{{foo | size}}-{{bar.coo}}', { foo: 'foo', bar: Object.create({ coo: 'COO' }) })
|
||||
expect(html).to.equal('3-')
|
||||
})
|
||||
it('#465 Liquidjs divided_by not compatible with Ruby/Shopify Liquid', () => {
|
||||
const engine = new Liquid({ ownPropertyOnly: true })
|
||||
const html = engine.parseAndRenderSync('{{ 5 | divided_by: 3, true }}')
|
||||
expect(html).to.equal('1')
|
||||
})
|
||||
it('#479 url_encode throws on undefined value', async () => {
|
||||
const engine = new Liquid({
|
||||
strictVariables: false
|
||||
|
||||
Reference in New Issue
Block a user