refactor: use camelCase for JavaScript APIs

BREAKING CHANGE: Options and method names in JavaScript API are now renamed to cammelCase, for a complete list see #109
This commit is contained in:
Jun Yang
2019-03-10 19:21:09 +08:00
parent 4a8088d4e4
commit 64e0c876e9
12 changed files with 16 additions and 68 deletions
-14
View File
@@ -11,14 +11,6 @@ describe('Output', function () {
Filter.clear()
})
it('should respect to .to_liquid() method', async function () {
const scope = new Scope({
bar: { to_liquid: () => 'custom' }
})
const output = new Output({ value: 'bar' } as OutputToken, false)
const html = await output.render(scope)
return expect(html).to.equal('custom')
})
it('should stringify objects', async function () {
const scope = new Scope({
foo: { obj: { arr: ['a', 2] } }
@@ -39,12 +31,6 @@ describe('Output', function () {
const str = await output.render(scope)
return expect(str).to.equal('FOO')
})
it('should respect to .to_s()', async () => {
const scope = new Scope({ obj: { to_s: () => 'FOO' } })
const output = new Output({ value: 'obj' } as OutputToken, false)
const str = await output.render(scope)
return expect(str).to.equal('FOO')
})
it('should respect to .toString()', async () => {
const scope = new Scope({ obj: { toString: () => 'FOO' } })
const output = new Output({ value: 'obj' } as OutputToken, false)