mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 14:30:38 -07:00
style: make eslint check .ts files
This commit is contained in:
@@ -17,7 +17,7 @@ describe('tags/tablerow', function () {
|
||||
it('should support promises', async function () {
|
||||
const src = '{% tablerow i in promiseNumbers %}{{ i }}{% endtablerow %}'
|
||||
const ctx = {
|
||||
promiseNumbers: Promise.resolve([1,2,3])
|
||||
promiseNumbers: Promise.resolve([1, 2, 3])
|
||||
}
|
||||
const dst = '<tr class="row1"><td class="col1">1</td><td class="col2">2</td><td class="col3">3</td></tr>'
|
||||
const html = await liquid.parseAndRender(src, ctx)
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('LiquidOptions#strict*', function () {
|
||||
return expect(engine.parseAndRender(html, ctx, opts)).to
|
||||
.be.rejectedWith(/undefined variable: notdefined/)
|
||||
})
|
||||
describe('with strictVariables and lenientIf', function() {
|
||||
describe('with strictVariables and lenientIf', function () {
|
||||
const strictLenientOpts = {
|
||||
strictVariables: true,
|
||||
lenientIf: true
|
||||
@@ -42,7 +42,7 @@ describe('LiquidOptions#strict*', function () {
|
||||
})
|
||||
it('should support elsif with undefined variables', async function () {
|
||||
const tpl = engine.parse('{% if notdefined1 %}a{% elsif notdefined2 %}b{% elsif defined3 %}{{defined3}}{% else %}d{% endif %}')
|
||||
const html = await engine.render(tpl, {'defined3': 'bla'}, strictLenientOpts)
|
||||
const html = await engine.render(tpl, { 'defined3': 'bla' }, strictLenientOpts)
|
||||
return expect(html).to.equal('bla')
|
||||
})
|
||||
it('should not throw in `unless` with a single variable', async function () {
|
||||
|
||||
Reference in New Issue
Block a user