fix: break/continue omitting output before them, #123

BREAKING CHANGE: remove default export, now should be used like import
{Liquid} from 'liquidjs'
This commit is contained in:
harttle
2019-08-26 10:15:43 -05:00
committed by Jun Yang
parent 854e12ba53
commit ae45c4622e
99 changed files with 373 additions and 407 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
import { expect } from 'chai'
import Context from '../../../src/context/context'
import Token from '../../../src/parser/token'
import Tag from '../../../src/template/tag/tag'
import { Context } from '../../../src/context/context'
import { Token } from '../../../src/parser/token'
import { Tag } from '../../../src/template/tag/tag'
import { Filter } from '../../../src/template/filter/filter'
import Render from '../../../src/render/render'
import HTML from '../../../src/template/html'
import { Render } from '../../../src/render/render'
import { HTML } from '../../../src/template/html'
describe('render', function () {
let render: Render
+2 -2
View File
@@ -1,4 +1,4 @@
import Context from '../../../src/context/context'
import { Context } from '../../../src/context/context'
import { expect } from 'chai'
import { evalExp, evalValue, isTruthy } from '../../../src/render/syntax'
@@ -62,7 +62,7 @@ describe('render/syntax', function () {
describe('.evalExp()', function () {
it('should throw when scope undefined', async function () {
return expect((evalExp as any)('')).to.be.rejectedWith(/scope undefined/)
return expect(() => (evalExp as any)('')).to.throw(/scope undefined/)
})
it('should eval simple expression', async function () {