feat: exported Drop interface for #107

Deprecate snake_cased options and APIs, sed #109
This commit is contained in:
harttle
2019-02-28 00:05:08 +08:00
parent b69c3a3203
commit 7bee9fc92d
26 changed files with 227 additions and 179 deletions
+1 -1
View File
@@ -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: "" }}',
+1 -1
View File
@@ -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]')
})
})
+1 -1
View File
@@ -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}}'