refactor: remove /dist from repo

This commit is contained in:
harttle
2019-02-24 23:03:12 +08:00
parent f9f35ebd6c
commit 407ac6d0a4
185 changed files with 44 additions and 6025 deletions
+33
View File
@@ -0,0 +1,33 @@
import Liquid from 'src/liquid'
import { expect } from 'chai'
describe('LiquidOptions#strict_*', function () {
let engine: Liquid
const ctx = {}
beforeEach(function () {
engine = new Liquid({
root: '/root/',
extname: '.html'
})
})
it('should not throw when strict_variables false (default)', async function () {
const html = await engine.parseAndRender('before{{notdefined}}after', ctx)
return expect(html).to.equal('beforeafter')
})
it('should throw when strict_variables true', function () {
const tpl = engine.parse('before{{notdefined}}after')
const 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 () {
const html = 'before{{notdefined}}after'
const opts = {
strict_variables: true
}
return expect(engine.parseAndRender(html, ctx, opts)).to
.be.rejectedWith(/undefined variable: notdefined/)
})
})