mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
feat: renderSync, parseAndRenderSync and renderFileSync, see #48
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { expect } from 'chai'
|
||||
import { Liquid } from '../..'
|
||||
|
||||
describe('#evalValueSync()', function () {
|
||||
var engine: Liquid
|
||||
beforeEach(() => { engine = new Liquid() })
|
||||
|
||||
it('should throw when scope undefined', async function () {
|
||||
return expect(() => engine.evalValueSync('{{"foo"}}', null as any)).to.throw(/context not defined/)
|
||||
})
|
||||
})
|
||||
@@ -6,6 +6,6 @@ describe('.evalValue()', function () {
|
||||
beforeEach(() => { engine = new Liquid() })
|
||||
|
||||
it('should throw when scope undefined', async function () {
|
||||
return expect(() => engine.evalValue('{{"foo"}}', null as any)).to.throw(/context not defined/)
|
||||
return expect(engine.evalValue('{{"foo"}}', null as any)).to.be.rejectedWith(/context not defined/)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user