mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
style: introduce @typescript-eslint/recommended
This commit is contained in:
+6
-6
@@ -5,11 +5,11 @@ import * as chaiAsPromised from 'chai-as-promised'
|
||||
use(chaiAsPromised)
|
||||
|
||||
class SettingsDrop extends Liquid.Types.Drop {
|
||||
foo: string = 'FOO'
|
||||
bar () {
|
||||
private foo: string = 'FOO'
|
||||
public bar () {
|
||||
return 'BAR'
|
||||
}
|
||||
liquidMethodMissing (key: string) {
|
||||
public liquidMethodMissing (key: string) {
|
||||
return key.toUpperCase()
|
||||
}
|
||||
}
|
||||
@@ -29,10 +29,10 @@ describe('drop', function () {
|
||||
describe('BlandDrop', function () {
|
||||
it('should test blank strings', async function () {
|
||||
const src = `
|
||||
{% unless settings.fp_heading == blank %}
|
||||
<h1>{{ settings.fp_heading }}</h1>
|
||||
{% unless settings.fpHeading == blank %}
|
||||
<h1>{{ settings.fpHeading }}</h1>
|
||||
{% endunless %}`
|
||||
var ctx = { settings: { fp_heading: '' } }
|
||||
var ctx = { settings: { fpHeading: '' } }
|
||||
const html = await engine.parseAndRender(src, ctx)
|
||||
return expect(html).to.match(/^\s+$/)
|
||||
})
|
||||
|
||||
+2
-2
@@ -136,7 +136,7 @@ describe('xhr', () => {
|
||||
[200, { 'Content-Type': 'text/plain' }, 'foo2'])
|
||||
return engine.renderFile('foo.html')
|
||||
})
|
||||
.then((html:string) => expect(html).to.equal('foo2'))
|
||||
.then((html: string) => expect(html).to.equal('foo2'))
|
||||
})
|
||||
it('should respect cache=true option', () => {
|
||||
engine = new Liquid({
|
||||
@@ -153,7 +153,7 @@ describe('xhr', () => {
|
||||
[200, { 'Content-Type': 'text/plain' }, 'foo2'])
|
||||
return engine.renderFile('foo.html')
|
||||
})
|
||||
.then((html:string) => expect(html).to.equal('foo1'))
|
||||
.then((html: string) => expect(html).to.equal('foo1'))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user