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