mirror of
https://github.com/harttle/liquidjs.git
synced 2026-10-03 09:05:14 -07:00
test: fix e2e test
This commit is contained in:
@@ -5,7 +5,7 @@ describe('#evalValueSync()', function () {
|
|||||||
var engine: Liquid
|
var engine: Liquid
|
||||||
beforeEach(() => { engine = new Liquid() })
|
beforeEach(() => { engine = new Liquid() })
|
||||||
|
|
||||||
it('should throw when scope undefined', async function () {
|
it('should eval value syncly', async function () {
|
||||||
return expect(() => engine.evalValueSync('foo', null as any)).to.throw(/context not defined/)
|
return expect(engine.evalValueSync('true', { opts: {} } as any)).to.equal(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ describe('#evalValue()', function () {
|
|||||||
var engine: Liquid
|
var engine: Liquid
|
||||||
beforeEach(() => { engine = new Liquid() })
|
beforeEach(() => { engine = new Liquid() })
|
||||||
|
|
||||||
it('should throw when scope undefined', async function () {
|
it('should eval value', async function () {
|
||||||
return expect(engine.evalValue('"foo"', null as any)).to.be.rejectedWith(/context not defined/)
|
const val = await engine.evalValue('true', { opts: {} } as any)
|
||||||
|
expect(val).to.equal(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user