mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 14:00:39 -07:00
feat: exported Drop interface for #107
Deprecate snake_cased options and APIs, sed #109
This commit is contained in:
@@ -19,7 +19,7 @@ describe('filters/array', function () {
|
||||
return test(src, 'tiger')
|
||||
})
|
||||
it('should support map', function () {
|
||||
return test('{{posts | map: "category"}}', '["foo","bar"]')
|
||||
return test('{{posts | map: "category"}}', 'foo,bar')
|
||||
})
|
||||
it('should support reverse', function () {
|
||||
return test('{{ "Ground control to Major Tom." | split: "" | reverse | join: "" }}',
|
||||
|
||||
@@ -15,6 +15,6 @@ describe('filters/date', function () {
|
||||
return test('{{ "foo" | date: "%Y"}}', 'foo')
|
||||
})
|
||||
it('should render object as string if not valid', function () {
|
||||
return test('{{ obj | date: "%Y"}}', '{"foo":"bar"}')
|
||||
return test('{{ obj | date: "%Y"}}', '[object Object]')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -31,7 +31,7 @@ describe('tags/assign', function () {
|
||||
it('should assign as array', async function () {
|
||||
const src = '{% assign foo=(1..3) %}{{foo}}'
|
||||
const html = await liquid.parseAndRender(src)
|
||||
return expect(html).to.equal('[1,2,3]')
|
||||
return expect(html).to.equal('1,2,3')
|
||||
})
|
||||
it('should assign as filter result', async function () {
|
||||
const src = '{% assign foo="a b" | capitalize | split: " " | first %}{{foo}}'
|
||||
|
||||
Reference in New Issue
Block a user