Skip to content

Commit

Permalink
test: fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
harttle committed Dec 7, 2020
1 parent 117673a commit e15803f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/e2e/eval-value-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 3 additions & 2 deletions test/e2e/eval-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})

0 comments on commit e15803f

Please sign in to comment.