mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 22:10:41 -07:00
refactor: es6 building and linting
This commit is contained in:
@@ -4,8 +4,8 @@ const Liquid = require('../../src')
|
||||
chai.use(require('chai-as-promised'))
|
||||
|
||||
describe('strict options', function () {
|
||||
var engine
|
||||
var ctx = {}
|
||||
let engine
|
||||
let ctx = {}
|
||||
beforeEach(function () {
|
||||
engine = Liquid({
|
||||
root: '/root/',
|
||||
@@ -17,16 +17,16 @@ describe('strict options', function () {
|
||||
.eventually.equal('beforeafter')
|
||||
})
|
||||
it('should throw when strict_variables true', function () {
|
||||
var tpl = engine.parse('before{{notdefined}}after')
|
||||
var opts = {
|
||||
let tpl = engine.parse('before{{notdefined}}after')
|
||||
let opts = {
|
||||
strict_variables: true
|
||||
}
|
||||
return expect(engine.render(tpl, ctx, opts)).to
|
||||
.be.rejectedWith(/undefined variable: notdefined/)
|
||||
})
|
||||
it('should pass strict_variables to render by parseAndRender', function () {
|
||||
var html = 'before{{notdefined}}after'
|
||||
var opts = {
|
||||
let html = 'before{{notdefined}}after'
|
||||
let opts = {
|
||||
strict_variables: true
|
||||
}
|
||||
return expect(engine.parseAndRender(html, ctx, opts)).to
|
||||
|
||||
Reference in New Issue
Block a user