use isTruthy for and/or operators, fixes #47

This commit is contained in:
harttle
2017-11-26 23:59:50 +08:00
parent d348edac14
commit 8efb41a631
5 changed files with 114 additions and 96 deletions
+3 -7
View File
@@ -70,13 +70,9 @@ describe('liquid', function () {
it('should render template multiple times', function () {
var template = engine.parse('{{obj}}')
return engine.render(template, ctx)
.then((result) => {
expect(result).to.equal('{"foo":"bar"}')
return engine.render(template, ctx)
})
.then((result) => {
return expect(result).to.equal('{"foo":"bar"}')
})
.then(result => expect(result).to.equal('{"foo":"bar"}'))
.then(() => engine.render(template, ctx))
.then((result) => expect(result).to.equal('{"foo":"bar"}'))
})
it('should render filters', function () {
var template = engine.parse('<p>{{arr | join: "_"}}</p>')